File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
llvm/test/Transforms/InstSimplify Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -211,6 +211,24 @@ define double @fmul_nnan_ninf_nneg_n0.0_commute(i127 %x) {
211
211
ret double %r
212
212
}
213
213
214
+ define float @src_mul_nzero_neg (float nofpclass(inf nan pzero psub pnorm) %f ) {
215
+ ; CHECK-LABEL: @src_mul_nzero_neg(
216
+ ; CHECK-NEXT: [[R:%.*]] = fmul float [[F:%.*]], -0.000000e+00
217
+ ; CHECK-NEXT: ret float [[R]]
218
+ ;
219
+ %r = fmul float %f , -0 .0
220
+ ret float %r
221
+ }
222
+
223
+ define float @src_mul_zero_neg (float nofpclass(inf nan pzero psub pnorm) %f ) {
224
+ ; CHECK-LABEL: @src_mul_zero_neg(
225
+ ; CHECK-NEXT: [[R:%.*]] = fmul float [[F:%.*]], 0.000000e+00
226
+ ; CHECK-NEXT: ret float [[R]]
227
+ ;
228
+ %r = fmul float %f , 0 .0
229
+ ret float %r
230
+ }
231
+
214
232
; Make sure we can infer %x can't be 0 based on assumes.
215
233
define { float , float } @test_fmul_0_assumed_finite (float %x ) {
216
234
; CHECK-LABEL: @test_fmul_0_assumed_finite(
You can’t perform that action at this time.
0 commit comments