[llvm] r325365 - [InstCombine] add FMF to better show current fdiv fold behavior; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 16 09:46:50 PST 2018


Author: spatel
Date: Fri Feb 16 09:46:50 2018
New Revision: 325365

URL: http://llvm.org/viewvc/llvm-project?rev=325365&view=rev
Log:
[InstCombine] add FMF to better show current fdiv fold behavior; NFC

Modified:
    llvm/trunk/test/Transforms/InstCombine/fdiv.ll

Modified: llvm/trunk/test/Transforms/InstCombine/fdiv.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/fdiv.ll?rev=325365&r1=325364&r2=325365&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/fdiv.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/fdiv.ll Fri Feb 16 09:46:50 2018
@@ -119,11 +119,11 @@ define <2 x float> @not_exact_inverse_ve
 
 define float @div_with_div_numerator(float %x, float %y, float %z) {
 ; CHECK-LABEL: @div_with_div_numerator(
-; CHECK-NEXT:    [[TMP1:%.*]] = fmul float [[Y:%.*]], [[Z:%.*]]
+; CHECK-NEXT:    [[TMP1:%.*]] = fmul ninf float [[Y:%.*]], [[Z:%.*]]
 ; CHECK-NEXT:    [[DIV2:%.*]] = fdiv fast float [[X:%.*]], [[TMP1]]
 ; CHECK-NEXT:    ret float [[DIV2]]
 ;
-  %div1 = fdiv float %x, %y
+  %div1 = fdiv ninf float %x, %y
   %div2 = fdiv fast float %div1, %z
   ret float %div2
 }
@@ -132,11 +132,11 @@ define float @div_with_div_numerator(flo
 
 define <2 x float> @div_with_div_denominator(<2 x float> %x, <2 x float> %y, <2 x float> %z) {
 ; CHECK-LABEL: @div_with_div_denominator(
-; CHECK-NEXT:    [[TMP1:%.*]] = fmul <2 x float> [[Z:%.*]], [[Y:%.*]]
+; CHECK-NEXT:    [[TMP1:%.*]] = fmul nnan <2 x float> [[Y:%.*]], [[Z:%.*]]
 ; CHECK-NEXT:    [[DIV2:%.*]] = fdiv fast <2 x float> [[TMP1]], [[X:%.*]]
 ; CHECK-NEXT:    ret <2 x float> [[DIV2]]
 ;
-  %div1 = fdiv <2 x float> %x, %y
+  %div1 = fdiv nnan <2 x float> %x, %y
   %div2 = fdiv fast <2 x float> %z, %div1
   ret <2 x float> %div2
 }




More information about the llvm-commits mailing list