llvm-project/flang/test/Lower/complex-part.f90
Markus Böck bd7eff1f2a [mlir][flang] Make use of the new GEPArg builder of GEP Op to simplify code
This is the follow up on https://reviews.llvm.org/D130730 which goes through upstream code and removes creating constant values in favour of using the constant indices in GEP directly. This leads to less and more readable code and more compact IR as well.

Differential Revision: https://reviews.llvm.org/D130731
2022-08-01 17:22:55 +02:00

13 lines
351 B
Fortran

! RUN: bbc %s -o - | tco | FileCheck %s
! RUN: %flang -emit-llvm -S -mmlir -disable-external-name-interop %s -o - | FileCheck %s
COMPLEX c
c%RE = 3.14
CALL sub(c)
END
! Verify that the offset in the struct does not regress from i32.
! CHECK-LABEL: define void @_QQmain()
! CHECK: getelementptr { float, float }, ptr %{{[0-9]+}}, i32 0, i32 0