[llvm-commits] [llvm] r62622 - /llvm/trunk/test/Transforms/InstCombine/2009-01-19-fmod-constant-float.ll
Dale Johannesen
dalej at apple.com
Tue Jan 20 13:58:13 PST 2009
Author: johannes
Date: Tue Jan 20 15:58:13 2009
New Revision: 62622
URL: http://llvm.org/viewvc/llvm-project?rev=62622&view=rev
Log:
Calls to fmod, it turns out, are constant-folded by
invoking the host fmod, not by lowering to frem and
constant-folding that. Fix this so it tests what I
want to test.
Modified:
llvm/trunk/test/Transforms/InstCombine/2009-01-19-fmod-constant-float.ll
Modified: llvm/trunk/test/Transforms/InstCombine/2009-01-19-fmod-constant-float.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/2009-01-19-fmod-constant-float.ll?rev=62622&r1=62621&r2=62622&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/2009-01-19-fmod-constant-float.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/2009-01-19-fmod-constant-float.ll Tue Jan 20 15:58:13 2009
@@ -11,7 +11,7 @@
%retval = alloca float ; <float*> [#uses=2]
%0 = alloca float ; <float*> [#uses=2]
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
- %1 = call double @fmod(double 1.000000e-01, double 1.000000e+00) nounwind readonly ; <double> [#uses=1]
+ %1 = frem double 1.000000e-01, 1.000000e+00 ; <double> [#uses=1]
%2 = fptrunc double %1 to float ; <float> [#uses=1]
store float %2, float* %0, align 4
%3 = load float* %0, align 4 ; <float> [#uses=1]
@@ -23,14 +23,12 @@
ret float %retval1
}
-declare double @fmod(double, double) nounwind readonly
-
define float @test2() nounwind {
entry:
%retval = alloca float ; <float*> [#uses=2]
%0 = alloca float ; <float*> [#uses=2]
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
- %1 = call double @fmod(double -1.000000e-01, double 1.000000e+00) nounwind readonly ; <double> [#uses=1]
+ %1 = frem double -1.000000e-01, 1.000000e+00 ; <double> [#uses=1]
%2 = fptrunc double %1 to float ; <float> [#uses=1]
store float %2, float* %0, align 4
%3 = load float* %0, align 4 ; <float> [#uses=1]
@@ -47,7 +45,7 @@
%retval = alloca float ; <float*> [#uses=2]
%0 = alloca float ; <float*> [#uses=2]
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
- %1 = call double @fmod(double 1.000000e-01, double -1.000000e+00) nounwind readonly ; <double> [#uses=1]
+ %1 = frem double 1.000000e-01, -1.000000e+00 ; <double> [#uses=1]
%2 = fptrunc double %1 to float ; <float> [#uses=1]
store float %2, float* %0, align 4
%3 = load float* %0, align 4 ; <float> [#uses=1]
@@ -64,7 +62,7 @@
%retval = alloca float ; <float*> [#uses=2]
%0 = alloca float ; <float*> [#uses=2]
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
- %1 = call double @fmod(double -1.000000e-01, double -1.000000e+00) nounwind readonly ; <double> [#uses=1]
+ %1 = frem double -1.000000e-01, -1.000000e+00 ; <double> [#uses=1]
%2 = fptrunc double %1 to float ; <float> [#uses=1]
store float %2, float* %0, align 4
%3 = load float* %0, align 4 ; <float> [#uses=1]
More information about the llvm-commits
mailing list