From: Sanjay Patel Date: Sun, 6 Oct 2019 13:19:05 +0000 (+0000) Subject: [InstCombine] add fast-math-flags for better test coverage; NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=772bad96b7289ea112a2a27997774463a2597975;p=llvm [InstCombine] add fast-math-flags for better test coverage; NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373848 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Transforms/InstCombine/fmul.ll b/test/Transforms/InstCombine/fmul.ll index 5ab6d93c834..1bcca95d045 100644 --- a/test/Transforms/InstCombine/fmul.ll +++ b/test/Transforms/InstCombine/fmul.ll @@ -1006,11 +1006,11 @@ define float @negate_if_true(float %x, i1 %cond) { 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_commute(<2 x double> %px, i1 %cond) { ; CHECK-LABEL: @negate_if_true_commute( ; CHECK-NEXT: [[X:%.*]] = fdiv <2 x double> , [[PX:%.*]] ; CHECK-NEXT: [[SEL:%.*]] = select i1 [[COND:%.*]], <2 x double> , <2 x double> -; 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> , %px ; thwart complexity-based canonicalization %sel = select i1 %cond, <2 x double> , <2 x double> - %r = fmul <2 x double> %x, %sel + %r = fmul ninf <2 x double> %x, %sel ret <2 x double> %r }