Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Lower / complex-operations.f90
blobb11ce6ee7f215e344e6c0ce4b708c188da4895f3
1 ! RUN: bbc %s -o - | FileCheck %s
3 ! CHECK-LABEL: @_QPadd_test
4 subroutine add_test(a,b,c)
5 complex :: a, b, c
6 ! CHECK-NOT: fir.extract_value
7 ! CHECK-NOT: fir.insert_value
8 ! CHECK: fir.addc {{.*}}: !fir.complex
9 a = b + c
10 end subroutine add_test
12 ! CHECK-LABEL: @_QPsub_test
13 subroutine sub_test(a,b,c)
14 complex :: a, b, c
15 ! CHECK-NOT: fir.extract_value
16 ! CHECK-NOT: fir.insert_value
17 ! CHECK: fir.subc {{.*}}: !fir.complex
18 a = b - c
19 end subroutine sub_test
21 ! CHECK-LABEL: @_QPmul_test
22 subroutine mul_test(a,b,c)
23 complex :: a, b, c
24 ! CHECK-NOT: fir.extract_value
25 ! CHECK-NOT: fir.insert_value
26 ! CHECK: fir.mulc {{.*}}: !fir.complex
27 a = b * c
28 end subroutine mul_test
30 ! CHECK-LABEL: @_QPdiv_test
31 subroutine div_test(a,b,c)
32 complex :: a, b, c
33 ! CHECK-NOT: fir.extract_value
34 ! CHECK-NOT: fir.insert_value
35 ! CHECK: fir.divc {{.*}}: !fir.complex
36 a = b / c
37 end subroutine div_test