@@ -5,98 +5,98 @@ module {
5
5
%c0 = arith.constant 0.000000e+00 : f32
6
6
%c1 = fir.convert %arg1 : (i32) -> f32
7
7
%c2 = complex.create %c1, %c0 : complex<f32>
8
- %0 = complex.pow %arg0, %c2 : complex<f32>
8
+ %0 = complex.pow %arg0, %c2 {fastmath = #arith.fastmath<reassoc, contract, nsz>} : complex<f32>
9
9
return %0 : complex<f32>
10
10
}
11
11
12
12
func.func @pow_c4_i8(%arg0: complex<f32>, %arg1: i64) -> complex<f32> {
13
13
%c0 = arith.constant 0.000000e+00 : f32
14
14
%c1 = fir.convert %arg1 : (i64) -> f32
15
15
%c2 = complex.create %c1, %c0 : complex<f32>
16
- %0 = complex.pow %arg0, %c2 : complex<f32>
16
+ %0 = complex.pow %arg0, %c2 {fastmath = #arith.fastmath<reassoc, contract, nsz>} : complex<f32>
17
17
return %0 : complex<f32>
18
18
}
19
19
20
20
func.func @pow_c4_c4(%arg0: complex<f32>, %arg1: complex<f32>) -> complex<f32> {
21
- %0 = complex.pow %arg0, %arg1 : complex<f32>
21
+ %0 = complex.pow %arg0, %arg1 {fastmath = #arith.fastmath<reassoc, contract, nsz>} : complex<f32>
22
22
return %0 : complex<f32>
23
23
}
24
24
25
25
func.func @pow_c8_i4(%arg0: complex<f64>, %arg1: i32) -> complex<f64> {
26
26
%c0 = arith.constant 0.000000e+00 : f64
27
27
%c1 = fir.convert %arg1 : (i32) -> f64
28
28
%c2 = complex.create %c1, %c0 : complex<f64>
29
- %0 = complex.pow %arg0, %c2 : complex<f64>
29
+ %0 = complex.pow %arg0, %c2 {fastmath = #arith.fastmath<reassoc, contract, nsz>} : complex<f64>
30
30
return %0 : complex<f64>
31
31
}
32
32
33
33
func.func @pow_c8_i8(%arg0: complex<f64>, %arg1: i64) -> complex<f64> {
34
34
%c0 = arith.constant 0.000000e+00 : f64
35
35
%c1 = fir.convert %arg1 : (i64) -> f64
36
36
%c2 = complex.create %c1, %c0 : complex<f64>
37
- %0 = complex.pow %arg0, %c2 : complex<f64>
37
+ %0 = complex.pow %arg0, %c2 {fastmath = #arith.fastmath<reassoc, contract, nsz>} : complex<f64>
38
38
return %0 : complex<f64>
39
39
}
40
40
41
41
func.func @pow_c8_c8(%arg0: complex<f64>, %arg1: complex<f64>) -> complex<f64> {
42
- %0 = complex.pow %arg0, %arg1 : complex<f64>
42
+ %0 = complex.pow %arg0, %arg1 {fastmath = #arith.fastmath<reassoc, contract, nsz>} : complex<f64>
43
43
return %0 : complex<f64>
44
44
}
45
45
46
46
func.func @pow_c16_i4(%arg0: complex<f128>, %arg1: i32) -> complex<f128> {
47
47
%c0 = arith.constant 0.000000e+00 : f128
48
48
%c1 = fir.convert %arg1 : (i32) -> f128
49
49
%c2 = complex.create %c1, %c0 : complex<f128>
50
- %0 = complex.pow %arg0, %c2 : complex<f128>
50
+ %0 = complex.pow %arg0, %c2 {fastmath = #arith.fastmath<reassoc, contract, nsz>} : complex<f128>
51
51
return %0 : complex<f128>
52
52
}
53
53
54
54
func.func @pow_c16_i8(%arg0: complex<f128>, %arg1: i64) -> complex<f128> {
55
55
%c0 = arith.constant 0.000000e+00 : f128
56
56
%c1 = fir.convert %arg1 : (i64) -> f128
57
57
%c2 = complex.create %c1, %c0 : complex<f128>
58
- %0 = complex.pow %arg0, %c2 : complex<f128>
58
+ %0 = complex.pow %arg0, %c2 {fastmath = #arith.fastmath<reassoc, contract, nsz>} : complex<f128>
59
59
return %0 : complex<f128>
60
60
}
61
61
62
62
func.func @pow_c16_c16(%arg0: complex<f128>, %arg1: complex<f128>) -> complex<f128> {
63
- %0 = complex.pow %arg0, %arg1 : complex<f128>
63
+ %0 = complex.pow %arg0, %arg1 {fastmath = #arith.fastmath<reassoc, contract, nsz>} : complex<f128>
64
64
return %0 : complex<f128>
65
65
}
66
66
}
67
67
68
68
// CHECK-LABEL: func.func @pow_c4_i4(
69
- // CHECK: fir.call @_FortranAcpowi(%{{.*}}, %{{.*}}) : (complex<f32>, i32) -> complex<f32>
69
+ // CHECK: fir.call @_FortranAcpowi(%{{.*}}, %{{.*}}) fastmath<reassoc,nsz,contract> : (complex<f32>, i32) -> complex<f32>
70
70
// CHECK-NOT: complex.pow
71
71
72
72
// CHECK-LABEL: func.func @pow_c4_i8(
73
- // CHECK: fir.call @_FortranAcpowk(%{{.*}}, %{{.*}}) : (complex<f32>, i64) -> complex<f32>
73
+ // CHECK: fir.call @_FortranAcpowk(%{{.*}}, %{{.*}}) fastmath<reassoc,nsz,contract> : (complex<f32>, i64) -> complex<f32>
74
74
// CHECK-NOT: complex.pow
75
75
76
76
// CHECK-LABEL: func.func @pow_c4_c4(
77
- // CHECK: fir.call @cpowf(%{{.*}}, %{{.*}}) : (complex<f32>, complex<f32>) -> complex<f32>
77
+ // CHECK: fir.call @cpowf(%{{.*}}, %{{.*}}) fastmath<reassoc,nsz,contract> : (complex<f32>, complex<f32>) -> complex<f32>
78
78
// CHECK-NOT: complex.pow
79
79
80
80
// CHECK-LABEL: func.func @pow_c8_i4(
81
- // CHECK: fir.call @_FortranAzpowi(%{{.*}}, %{{.*}}) : (complex<f64>, i32) -> complex<f64>
81
+ // CHECK: fir.call @_FortranAzpowi(%{{.*}}, %{{.*}}) fastmath<reassoc,nsz,contract> : (complex<f64>, i32) -> complex<f64>
82
82
// CHECK-NOT: complex.pow
83
83
84
84
// CHECK-LABEL: func.func @pow_c8_i8(
85
- // CHECK: fir.call @_FortranAzpowk(%{{.*}}, %{{.*}}) : (complex<f64>, i64) -> complex<f64>
85
+ // CHECK: fir.call @_FortranAzpowk(%{{.*}}, %{{.*}}) fastmath<reassoc,nsz,contract> : (complex<f64>, i64) -> complex<f64>
86
86
// CHECK-NOT: complex.pow
87
87
88
88
// CHECK-LABEL: func.func @pow_c8_c8(
89
- // CHECK: fir.call @cpow(%{{.*}}, %{{.*}}) : (complex<f64>, complex<f64>) -> complex<f64>
89
+ // CHECK: fir.call @cpow(%{{.*}}, %{{.*}}) fastmath<reassoc,nsz,contract> : (complex<f64>, complex<f64>) -> complex<f64>
90
90
// CHECK-NOT: complex.pow
91
91
92
92
// CHECK-LABEL: func.func @pow_c16_i4(
93
- // CHECK: fir.call @_FortranAcqpowi(%{{.*}}, %{{.*}}) : (complex<f128>, i32) -> complex<f128>
93
+ // CHECK: fir.call @_FortranAcqpowi(%{{.*}}, %{{.*}}) fastmath<reassoc,nsz,contract> : (complex<f128>, i32) -> complex<f128>
94
94
// CHECK-NOT: complex.pow
95
95
96
96
// CHECK-LABEL: func.func @pow_c16_i8(
97
- // CHECK: fir.call @_FortranAcqpowk(%{{.*}}, %{{.*}}) : (complex<f128>, i64) -> complex<f128>
97
+ // CHECK: fir.call @_FortranAcqpowk(%{{.*}}, %{{.*}}) fastmath<reassoc,nsz,contract> : (complex<f128>, i64) -> complex<f128>
98
98
// CHECK-NOT: complex.pow
99
99
100
100
// CHECK-LABEL: func.func @pow_c16_c16(
101
- // CHECK: fir.call @_FortranACPowF128(%{{.*}}, %{{.*}}) : (complex<f128>, complex<f128>) -> complex<f128>
101
+ // CHECK: fir.call @_FortranACPowF128(%{{.*}}, %{{.*}}) fastmath<reassoc,nsz,contract> : (complex<f128>, complex<f128>) -> complex<f128>
102
102
// CHECK-NOT: complex.pow
0 commit comments