[llvm] r373848 - [InstCombine] add fast-math-flags for better test coverage; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 6 06:19:05 PDT 2019
Author: spatel
Date: Sun Oct 6 06:19:05 2019
New Revision: 373848
URL: http://llvm.org/viewvc/llvm-project?rev=373848&view=rev
Log:
[InstCombine] add fast-math-flags for better test coverage; NFC
Modified:
llvm/trunk/test/Transforms/InstCombine/fmul.ll
Modified: llvm/trunk/test/Transforms/InstCombine/fmul.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/fmul.ll?rev=373848&r1=373847&r2=373848&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/fmul.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/fmul.ll Sun Oct 6 06:19:05 2019
@@ -1006,11 +1006,11 @@ define float @negate_if_true(float %x, i
define float @negate_if_false(float %x, i1 %cond) {
; CHECK-LABEL: @negate_if_false(
; CHECK-NEXT: [[SEL:%.*]] = select i1 [[COND:%.*]], float 1.000000e+00, float -1.000000e+00
-; CHECK-NEXT: [[R:%.*]] = fmul float [[SEL]], [[X:%.*]]
+; CHECK-NEXT: [[R:%.*]] = fmul arcp float [[SEL]], [[X:%.*]]
; CHECK-NEXT: ret float [[R]]
;
%sel = select i1 %cond, float 1.0, float -1.0
- %r = fmul float %sel, %x
+ %r = fmul arcp float %sel, %x
ret float %r
}
@@ -1018,12 +1018,12 @@ define <2 x double> @negate_if_true_comm
; CHECK-LABEL: @negate_if_true_commute(
; CHECK-NEXT: [[X:%.*]] = fdiv <2 x double> <double 4.200000e+01, double 4.200000e+01>, [[PX:%.*]]
; CHECK-NEXT: [[SEL:%.*]] = select i1 [[COND:%.*]], <2 x double> <double -1.000000e+00, double -1.000000e+00>, <2 x double> <double 1.000000e+00, double 1.000000e+00>
-; CHECK-NEXT: [[R:%.*]] = fmul <2 x double> [[X]], [[SEL]]
+; CHECK-NEXT: [[R:%.*]] = fmul ninf <2 x double> [[X]], [[SEL]]
; CHECK-NEXT: ret <2 x double> [[R]]
;
%x = fdiv <2 x double> <double 42.0, double 42.0>, %px ; thwart complexity-based canonicalization
%sel = select i1 %cond, <2 x double> <double -1.0, double -1.0>, <2 x double> <double 1.0, double 1.0>
- %r = fmul <2 x double> %x, %sel
+ %r = fmul ninf <2 x double> %x, %sel
ret <2 x double> %r
}
More information about the llvm-commits
mailing list