@@ -22,10 +22,10 @@ func @returncomplex4() -> !fir.complex<4> {
22
22
%2 = arith.constant 2.0 : f32
23
23
%3 = fir.convert %2 : (f32) -> !fir.real<4>
24
24
%c0 = arith.constant 0 : i32
25
- %4 = fir.insert_value %1, %3, [0 : index ] : (!fir.complex<4>, !fir.real<4>) -> !fir.complex<4>
25
+ %4 = fir.insert_value %1, %3, [0 : i32 ] : (!fir.complex<4>, !fir.real<4>) -> !fir.complex<4>
26
26
%c1 = arith.constant 1 : i32
27
27
%5 = arith.constant -42.0 : f32
28
- %6 = fir.insert_value %4, %5, [1 : index ] : (!fir.complex<4>, f32) -> !fir.complex<4>
28
+ %6 = fir.insert_value %4, %5, [1 : i32 ] : (!fir.complex<4>, f32) -> !fir.complex<4>
29
29
30
30
// I32: [[ADDRI64:%[0-9A-Za-z]+]] = fir.alloca i64
31
31
// I32: [[ADDRC:%[0-9A-Za-z]+]] = fir.convert [[ADDRI64]] : (!fir.ref<i64>) -> !fir.ref<!fir.complex<4>>
@@ -70,9 +70,9 @@ func @returncomplex8() -> !fir.complex<8> {
70
70
%2 = arith.constant 1.0 : f64
71
71
%3 = arith.constant -4.0 : f64
72
72
%c0 = arith.constant 0 : i32
73
- %4 = fir.insert_value %1, %3, [0 : index ] : (!fir.complex<8>, f64) -> !fir.complex<8>
73
+ %4 = fir.insert_value %1, %3, [0 : i32 ] : (!fir.complex<8>, f64) -> !fir.complex<8>
74
74
%c1 = arith.constant 1 : i32
75
- %5 = fir.insert_value %4, %2, [1 : index ] : (!fir.complex<8>, f64) -> !fir.complex<8>
75
+ %5 = fir.insert_value %4, %2, [1 : i32 ] : (!fir.complex<8>, f64) -> !fir.complex<8>
76
76
77
77
// I32: [[ADDR:%[0-9A-Za-z]+]] = fir.convert [[ARG0]] : (!fir.ref<tuple<!fir.real<8>, !fir.real<8>>>) -> !fir.ref<!fir.complex<8>>
78
78
// I32: fir.store [[VAL]] to [[ADDR]] : !fir.ref<!fir.complex<8>>
@@ -148,8 +148,8 @@ func @callcomplex4() {
148
148
// PPC: fir.store [[RES]] to [[ADDRT]] : !fir.ref<tuple<!fir.real<4>, !fir.real<4>>>
149
149
// PPC: [[ADDRC:%[0-9A-Za-z]+]] = fir.convert [[ADDRT]] : (!fir.ref<tuple<!fir.real<4>, !fir.real<4>>>) -> !fir.ref<!fir.complex<4>>
150
150
// PPC: [[V:%[0-9A-Za-z]+]] = fir.load [[ADDRC]] : !fir.ref<!fir.complex<4>>
151
- // PPC: [[A:%[0-9A-Za-z]+]] = fir.extract_value [[V]], [0 : index ] : (!fir.complex<4>) -> !fir.real<4>
152
- // PPC: [[B:%[0-9A-Za-z]+]] = fir.extract_value [[V]], [1 : index ] : (!fir.complex<4>) -> !fir.real<4>
151
+ // PPC: [[A:%[0-9A-Za-z]+]] = fir.extract_value [[V]], [0 : i32 ] : (!fir.complex<4>) -> !fir.real<4>
152
+ // PPC: [[B:%[0-9A-Za-z]+]] = fir.extract_value [[V]], [1 : i32 ] : (!fir.complex<4>) -> !fir.real<4>
153
153
// PPC: fir.call @paramcomplex4([[A]], [[B]]) : (!fir.real<4>, !fir.real<4>) -> ()
154
154
fir.call @paramcomplex4(%1) : (!fir.complex<4>) -> ()
155
155
return
@@ -186,8 +186,8 @@ func @callcomplex8() {
186
186
// X64: fir.store [[RES]] to [[ADDRT]] : !fir.ref<tuple<!fir.real<8>, !fir.real<8>>>
187
187
// X64: [[ADDRC:%[0-9A-Za-z]+]] = fir.convert [[ADDRT]] : (!fir.ref<tuple<!fir.real<8>, !fir.real<8>>>) -> !fir.ref<!fir.complex<8>>
188
188
// X64: [[V:%[0-9A-Za-z]+]] = fir.load [[ADDRC]] : !fir.ref<!fir.complex<8>>
189
- // X64: [[A:%[0-9A-Za-z]+]] = fir.extract_value [[V]], [0 : index ] : (!fir.complex<8>) -> !fir.real<8>
190
- // X64: [[B:%[0-9A-Za-z]+]] = fir.extract_value [[V]], [1 : index ] : (!fir.complex<8>) -> !fir.real<8>
189
+ // X64: [[A:%[0-9A-Za-z]+]] = fir.extract_value [[V]], [0 : i32 ] : (!fir.complex<8>) -> !fir.real<8>
190
+ // X64: [[B:%[0-9A-Za-z]+]] = fir.extract_value [[V]], [1 : i32 ] : (!fir.complex<8>) -> !fir.real<8>
191
191
// X64: fir.call @paramcomplex8([[A]], [[B]]) : (!fir.real<8>, !fir.real<8>) -> ()
192
192
193
193
// AARCH64: [[ADDRT:%[0-9A-Za-z]+]] = fir.alloca tuple<!fir.real<8>, !fir.real<8>>
@@ -204,8 +204,8 @@ func @callcomplex8() {
204
204
// PPC: fir.store [[RES]] to [[ADDRT]] : !fir.ref<tuple<!fir.real<8>, !fir.real<8>>>
205
205
// PPC: [[ADDRC:%[0-9A-Za-z]+]] = fir.convert [[ADDRT]] : (!fir.ref<tuple<!fir.real<8>, !fir.real<8>>>) -> !fir.ref<!fir.complex<8>>
206
206
// PPC: [[V:%[0-9A-Za-z]+]] = fir.load [[ADDRC]] : !fir.ref<!fir.complex<8>>
207
- // PPC: [[A:%[0-9A-Za-z]+]] = fir.extract_value [[V]], [0 : index ] : (!fir.complex<8>) -> !fir.real<8>
208
- // PPC: [[B:%[0-9A-Za-z]+]] = fir.extract_value [[V]], [1 : index ] : (!fir.complex<8>) -> !fir.real<8>
207
+ // PPC: [[A:%[0-9A-Za-z]+]] = fir.extract_value [[V]], [0 : i32 ] : (!fir.complex<8>) -> !fir.real<8>
208
+ // PPC: [[B:%[0-9A-Za-z]+]] = fir.extract_value [[V]], [1 : i32 ] : (!fir.complex<8>) -> !fir.real<8>
209
209
// PPC: fir.call @paramcomplex8([[A]], [[B]]) : (!fir.real<8>, !fir.real<8>) -> ()
210
210
fir.call @paramcomplex8(%1) : (!fir.complex<8>) -> ()
211
211
return
@@ -303,21 +303,21 @@ func @multipleparamscomplex4(%z1 : !fir.complex<4>, %z2 : !fir.complex<4>, %z3 :
303
303
// AARCH64: fir.call @calleemultipleparamscomplex4([[Z1_RELOADED]], [[Z2_RELOADED]], [[Z3_RELOADED]]) : (!fir.array<2x!fir.real<4>>, !fir.array<2x!fir.real<4>>, !fir.array<2x!fir.real<4>>) -> ()
304
304
305
305
// PPC-DAG: [[Z3_EMPTY:%[0-9A-Za-z]+]] = fir.undefine d !fir.complex<4>
306
- // PPC-DAG: [[Z3_PARTIAL:%[0-9A-Za-z]+]] = fir.insert_value [[Z3_EMPTY]], [[A3]], [0 : index ] : (!fir.complex<4>, !fir.real<4>) -> !fir.complex<4>
307
- // PPC-DAG: [[Z3:%[0-9A-Za-z]+]] = fir.insert_value [[Z3_PARTIAL]], [[B3]], [1 : index ] : (!fir.complex<4>, !fir.real<4>) -> !fir.complex<4>
306
+ // PPC-DAG: [[Z3_PARTIAL:%[0-9A-Za-z]+]] = fir.insert_value [[Z3_EMPTY]], [[A3]], [0 : i32 ] : (!fir.complex<4>, !fir.real<4>) -> !fir.complex<4>
307
+ // PPC-DAG: [[Z3:%[0-9A-Za-z]+]] = fir.insert_value [[Z3_PARTIAL]], [[B3]], [1 : i32 ] : (!fir.complex<4>, !fir.real<4>) -> !fir.complex<4>
308
308
// PPC-DAG: [[Z2_EMPTY:%[0-9A-Za-z]+]] = fir.undefine d !fir.complex<4>
309
- // PPC-DAG: [[Z2_PARTIAL:%[0-9A-Za-z]+]] = fir.insert_value [[Z2_EMPTY]], [[A2]], [0 : index ] : (!fir.complex<4>, !fir.real<4>) -> !fir.complex<4>
310
- // PPC-DAG: [[Z2:%[0-9A-Za-z]+]] = fir.insert_value [[Z2_PARTIAL]], [[B2]], [1 : index ] : (!fir.complex<4>, !fir.real<4>) -> !fir.complex<4>
309
+ // PPC-DAG: [[Z2_PARTIAL:%[0-9A-Za-z]+]] = fir.insert_value [[Z2_EMPTY]], [[A2]], [0 : i32 ] : (!fir.complex<4>, !fir.real<4>) -> !fir.complex<4>
310
+ // PPC-DAG: [[Z2:%[0-9A-Za-z]+]] = fir.insert_value [[Z2_PARTIAL]], [[B2]], [1 : i32 ] : (!fir.complex<4>, !fir.real<4>) -> !fir.complex<4>
311
311
// PPC-DAG: [[Z1_EMPTY:%[0-9A-Za-z]+]] = fir.undefine d !fir.complex<4>
312
- // PPC-DAG: [[Z1_PARTIAL:%[0-9A-Za-z]+]] = fir.insert_value [[Z1_EMPTY]], [[A1]], [0 : index ] : (!fir.complex<4>, !fir.real<4>) -> !fir.complex<4>
313
- // PPC-DAG: [[Z1:%[0-9A-Za-z]+]] = fir.insert_value [[Z1_PARTIAL]], [[B1]], [1 : index ] : (!fir.complex<4>, !fir.real<4>) -> !fir.complex<4>
312
+ // PPC-DAG: [[Z1_PARTIAL:%[0-9A-Za-z]+]] = fir.insert_value [[Z1_EMPTY]], [[A1]], [0 : i32 ] : (!fir.complex<4>, !fir.real<4>) -> !fir.complex<4>
313
+ // PPC-DAG: [[Z1:%[0-9A-Za-z]+]] = fir.insert_value [[Z1_PARTIAL]], [[B1]], [1 : i32 ] : (!fir.complex<4>, !fir.real<4>) -> !fir.complex<4>
314
314
315
- // PPC-DAG: [[A1_EXTR:%[0-9A-Za-z]+]] = fir.extract_value [[Z1]], [0 : index ] : (!fir.complex<4>) -> !fir.real<4>
316
- // PPC-DAG: [[B1_EXTR:%[0-9A-Za-z]+]] = fir.extract_value [[Z1]], [1 : index ] : (!fir.complex<4>) -> !fir.real<4>
317
- // PPC-DAG: [[A2_EXTR:%[0-9A-Za-z]+]] = fir.extract_value [[Z2]], [0 : index ] : (!fir.complex<4>) -> !fir.real<4>
318
- // PPC-DAG: [[B2_EXTR:%[0-9A-Za-z]+]] = fir.extract_value [[Z2]], [1 : index ] : (!fir.complex<4>) -> !fir.real<4>
319
- // PPC-DAG: [[A3_EXTR:%[0-9A-Za-z]+]] = fir.extract_value [[Z3]], [0 : index ] : (!fir.complex<4>) -> !fir.real<4>
320
- // PPC-DAG: [[B3_EXTR:%[0-9A-Za-z]+]] = fir.extract_value [[Z3]], [1 : index ] : (!fir.complex<4>) -> !fir.real<4>
315
+ // PPC-DAG: [[A1_EXTR:%[0-9A-Za-z]+]] = fir.extract_value [[Z1]], [0 : i32 ] : (!fir.complex<4>) -> !fir.real<4>
316
+ // PPC-DAG: [[B1_EXTR:%[0-9A-Za-z]+]] = fir.extract_value [[Z1]], [1 : i32 ] : (!fir.complex<4>) -> !fir.real<4>
317
+ // PPC-DAG: [[A2_EXTR:%[0-9A-Za-z]+]] = fir.extract_value [[Z2]], [0 : i32 ] : (!fir.complex<4>) -> !fir.real<4>
318
+ // PPC-DAG: [[B2_EXTR:%[0-9A-Za-z]+]] = fir.extract_value [[Z2]], [1 : i32 ] : (!fir.complex<4>) -> !fir.real<4>
319
+ // PPC-DAG: [[A3_EXTR:%[0-9A-Za-z]+]] = fir.extract_value [[Z3]], [0 : i32 ] : (!fir.complex<4>) -> !fir.real<4>
320
+ // PPC-DAG: [[B3_EXTR:%[0-9A-Za-z]+]] = fir.extract_value [[Z3]], [1 : i32 ] : (!fir.complex<4>) -> !fir.real<4>
321
321
322
322
// PPC: fir.call @calleemultipleparamscomplex4([[A1_EXTR]], [[B1_EXTR]], [[A2_EXTR]], [[B2_EXTR]], [[A3_EXTR]], [[B3_EXTR]]) : (!fir.real<4>, !fir.real<4>, !fir.real<4>, !fir.real<4>, !fir.real<4>, !fir.real<4>) -> ()
323
323
@@ -397,16 +397,16 @@ func private @mlircomplexf32(%z1: complex<f32>, %z2: complex<f32>) -> complex<f3
397
397
// AARCH64: [[VAL:%[0-9A-Za-z]+]] = fir.call @mlircomplexf32([[Z1_RELOADED]], [[Z2_RELOADED]]) : (!fir.array<2xf32>, !fir.array<2xf32>) -> tuple<f32, f32>
398
398
399
399
// PPC-DAG: [[Z2_EMPTY:%[0-9A-Za-z]+]] = fir.undefine d complex<f32>
400
- // PPC-DAG: [[Z2_PARTIAL:%[0-9A-Za-z]+]] = fir.insert_value [[Z2_EMPTY]], [[A2]], [0 : index ] : (complex<f32>, f32) -> complex<f32>
401
- // PPC-DAG: [[Z2:%[0-9A-Za-z]+]] = fir.insert_value [[Z2_PARTIAL]], [[B2]], [1 : index ] : (complex<f32>, f32) -> complex<f32>
400
+ // PPC-DAG: [[Z2_PARTIAL:%[0-9A-Za-z]+]] = fir.insert_value [[Z2_EMPTY]], [[A2]], [0 : i32 ] : (complex<f32>, f32) -> complex<f32>
401
+ // PPC-DAG: [[Z2:%[0-9A-Za-z]+]] = fir.insert_value [[Z2_PARTIAL]], [[B2]], [1 : i32 ] : (complex<f32>, f32) -> complex<f32>
402
402
// PPC-DAG: [[Z1_EMPTY:%[0-9A-Za-z]+]] = fir.undefine d complex<f32>
403
- // PPC-DAG: [[Z1_PARTIAL:%[0-9A-Za-z]+]] = fir.insert_value [[Z1_EMPTY]], [[A1]], [0 : index ] : (complex<f32>, f32) -> complex<f32>
404
- // PPC-DAG: [[Z1:%[0-9A-Za-z]+]] = fir.insert_value [[Z1_PARTIAL]], [[B1]], [1 : index ] : (complex<f32>, f32) -> complex<f32>
403
+ // PPC-DAG: [[Z1_PARTIAL:%[0-9A-Za-z]+]] = fir.insert_value [[Z1_EMPTY]], [[A1]], [0 : i32 ] : (complex<f32>, f32) -> complex<f32>
404
+ // PPC-DAG: [[Z1:%[0-9A-Za-z]+]] = fir.insert_value [[Z1_PARTIAL]], [[B1]], [1 : i32 ] : (complex<f32>, f32) -> complex<f32>
405
405
406
- // PPC-DAG: [[A1_EXTR:%[0-9A-Za-z]+]] = fir.extract_value [[Z1]], [0 : index ] : (complex<f32>) -> f32
407
- // PPC-DAG: [[B1_EXTR:%[0-9A-Za-z]+]] = fir.extract_value [[Z1]], [1 : index ] : (complex<f32>) -> f32
408
- // PPC-DAG: [[A2_EXTR:%[0-9A-Za-z]+]] = fir.extract_value [[Z2]], [0 : index ] : (complex<f32>) -> f32
409
- // PPC-DAG: [[B2_EXTR:%[0-9A-Za-z]+]] = fir.extract_value [[Z2]], [1 : index ] : (complex<f32>) -> f32
406
+ // PPC-DAG: [[A1_EXTR:%[0-9A-Za-z]+]] = fir.extract_value [[Z1]], [0 : i32 ] : (complex<f32>) -> f32
407
+ // PPC-DAG: [[B1_EXTR:%[0-9A-Za-z]+]] = fir.extract_value [[Z1]], [1 : i32 ] : (complex<f32>) -> f32
408
+ // PPC-DAG: [[A2_EXTR:%[0-9A-Za-z]+]] = fir.extract_value [[Z2]], [0 : i32 ] : (complex<f32>) -> f32
409
+ // PPC-DAG: [[B2_EXTR:%[0-9A-Za-z]+]] = fir.extract_value [[Z2]], [1 : i32 ] : (complex<f32>) -> f32
410
410
411
411
// PPC: [[VAL:%[0-9A-Za-z]+]] = fir.call @mlircomplexf32([[A1_EXTR]], [[B1_EXTR]], [[A2_EXTR]], [[B2_EXTR]]) : (f32, f32, f32, f32) -> tuple<f32, f32>
412
412
%0 = fir.call @mlircomplexf32(%z1, %z2) : (complex<f32>, complex<f32>) -> complex<f32>
0 commit comments