1
- ; RUN: llc -verify-machineinstrs -O3 -mcpu=pwr7 -enable-unsafe-fp-math < %s | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-PWR
2
- ; RUN: llc -verify-machineinstrs -O3 -mcpu=a2q -enable-unsafe-fp-math < %s | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-QPX
1
+ ; RUN: llc -verify-machineinstrs -O3 -mcpu=pwr7 < %s | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-PWR
2
+ ; RUN: llc -verify-machineinstrs -O3 -mcpu=a2q < %s | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-QPX
3
3
target datalayout = "E-m:e-i64:64-n32:64"
4
4
target triple = "powerpc64-unknown-linux-gnu"
5
5
@@ -14,9 +14,9 @@ define float @reassociate_adds1(float %x0, float %x1, float %x2, float %x3) {
14
14
; CHECK: fadds 1, [[REG0]], [[REG1]]
15
15
; CHECK-NEXT: blr
16
16
17
- %t0 = fadd float %x0 , %x1
18
- %t1 = fadd float %t0 , %x2
19
- %t2 = fadd float %t1 , %x3
17
+ %t0 = fadd reassoc nsz float %x0 , %x1
18
+ %t1 = fadd reassoc nsz float %t0 , %x2
19
+ %t2 = fadd reassoc nsz float %t1 , %x3
20
20
ret float %t2
21
21
}
22
22
@@ -28,9 +28,9 @@ define float @reassociate_adds2(float %x0, float %x1, float %x2, float %x3) {
28
28
; CHECK: fadds 1, [[REG0]], [[REG1]]
29
29
; CHECK-NEXT: blr
30
30
31
- %t0 = fadd float %x0 , %x1
32
- %t1 = fadd float %x2 , %t0
33
- %t2 = fadd float %t1 , %x3
31
+ %t0 = fadd reassoc nsz float %x0 , %x1
32
+ %t1 = fadd reassoc nsz float %x2 , %t0
33
+ %t2 = fadd reassoc nsz float %t1 , %x3
34
34
ret float %t2
35
35
}
36
36
@@ -42,9 +42,9 @@ define float @reassociate_adds3(float %x0, float %x1, float %x2, float %x3) {
42
42
; CHECK: fadds 1, [[REG0]], [[REG1]]
43
43
; CHECK-NEXT: blr
44
44
45
- %t0 = fadd float %x0 , %x1
46
- %t1 = fadd float %t0 , %x2
47
- %t2 = fadd float %x3 , %t1
45
+ %t0 = fadd reassoc nsz float %x0 , %x1
46
+ %t1 = fadd reassoc nsz float %t0 , %x2
47
+ %t2 = fadd reassoc nsz float %x3 , %t1
48
48
ret float %t2
49
49
}
50
50
@@ -56,9 +56,9 @@ define float @reassociate_adds4(float %x0, float %x1, float %x2, float %x3) {
56
56
; CHECK: fadds 1, [[REG0]], [[REG1]]
57
57
; CHECK-NEXT: blr
58
58
59
- %t0 = fadd float %x0 , %x1
60
- %t1 = fadd float %x2 , %t0
61
- %t2 = fadd float %x3 , %t1
59
+ %t0 = fadd reassoc nsz float %x0 , %x1
60
+ %t1 = fadd reassoc nsz float %x2 , %t0
61
+ %t2 = fadd reassoc nsz float %x3 , %t1
62
62
ret float %t2
63
63
}
64
64
@@ -77,13 +77,13 @@ define float @reassociate_adds5(float %x0, float %x1, float %x2, float %x3, floa
77
77
; CHECK: fadds 1, [[REG2]], 8
78
78
; CHECK-NEXT: blr
79
79
80
- %t0 = fadd float %x0 , %x1
81
- %t1 = fadd float %t0 , %x2
82
- %t2 = fadd float %t1 , %x3
83
- %t3 = fadd float %t2 , %x4
84
- %t4 = fadd float %t3 , %x5
85
- %t5 = fadd float %t4 , %x6
86
- %t6 = fadd float %t5 , %x7
80
+ %t0 = fadd reassoc nsz float %x0 , %x1
81
+ %t1 = fadd reassoc nsz float %t0 , %x2
82
+ %t2 = fadd reassoc nsz float %t1 , %x3
83
+ %t3 = fadd reassoc nsz float %t2 , %x4
84
+ %t4 = fadd reassoc nsz float %t3 , %x5
85
+ %t5 = fadd reassoc nsz float %t4 , %x6
86
+ %t6 = fadd reassoc nsz float %t5 , %x7
87
87
ret float %t6
88
88
}
89
89
@@ -100,9 +100,9 @@ define <4 x float> @vector_reassociate_adds1(<4 x float> %x0, <4 x float> %x1, <
100
100
; CHECK-PWR: xvaddsp 34, [[REG0]], [[REG1]]
101
101
; CHECK-NEXT: blr
102
102
103
- %t0 = fadd <4 x float > %x0 , %x1
104
- %t1 = fadd <4 x float > %t0 , %x2
105
- %t2 = fadd <4 x float > %t1 , %x3
103
+ %t0 = fadd reassoc nsz <4 x float > %x0 , %x1
104
+ %t1 = fadd reassoc nsz <4 x float > %t0 , %x2
105
+ %t2 = fadd reassoc nsz <4 x float > %t1 , %x3
106
106
ret <4 x float > %t2
107
107
}
108
108
@@ -117,9 +117,9 @@ define <4 x float> @vector_reassociate_adds2(<4 x float> %x0, <4 x float> %x1, <
117
117
; CHECK-PWR: xvaddsp 34, [[REG0]], [[REG1]]
118
118
; CHECK-NEXT: blr
119
119
120
- %t0 = fadd <4 x float > %x0 , %x1
121
- %t1 = fadd <4 x float > %x2 , %t0
122
- %t2 = fadd <4 x float > %t1 , %x3
120
+ %t0 = fadd reassoc nsz <4 x float > %x0 , %x1
121
+ %t1 = fadd reassoc nsz <4 x float > %x2 , %t0
122
+ %t2 = fadd reassoc nsz <4 x float > %t1 , %x3
123
123
ret <4 x float > %t2
124
124
}
125
125
@@ -134,9 +134,9 @@ define <4 x float> @vector_reassociate_adds3(<4 x float> %x0, <4 x float> %x1, <
134
134
; CHECK-PWR: xvaddsp 34, [[REG0]], [[REG1]]
135
135
; CHECK-NEXT: blr
136
136
137
- %t0 = fadd <4 x float > %x0 , %x1
138
- %t1 = fadd <4 x float > %t0 , %x2
139
- %t2 = fadd <4 x float > %x3 , %t1
137
+ %t0 = fadd reassoc nsz <4 x float > %x0 , %x1
138
+ %t1 = fadd reassoc nsz <4 x float > %t0 , %x2
139
+ %t2 = fadd reassoc nsz <4 x float > %x3 , %t1
140
140
ret <4 x float > %t2
141
141
}
142
142
@@ -151,9 +151,9 @@ define <4 x float> @vector_reassociate_adds4(<4 x float> %x0, <4 x float> %x1, <
151
151
; CHECK-PWR: xvaddsp 34, [[REG0]], [[REG1]]
152
152
; CHECK-NEXT: blr
153
153
154
- %t0 = fadd <4 x float > %x0 , %x1
155
- %t1 = fadd <4 x float > %x2 , %t0
156
- %t2 = fadd <4 x float > %x3 , %t1
154
+ %t0 = fadd reassoc nsz <4 x float > %x0 , %x1
155
+ %t1 = fadd reassoc nsz <4 x float > %x2 , %t0
156
+ %t2 = fadd reassoc nsz <4 x float > %x3 , %t1
157
157
ret <4 x float > %t2
158
158
}
159
159
0 commit comments