[llvm-commits] [llvm] r97531 - in /llvm/trunk: docs/ docs/tutorial/ lib/Target/PowerPC/ lib/Target/X86/ lib/Transforms/InstCombine/ test/ExecutionEngine/ test/Transforms/InstCombine/ test/Transforms/SimplifyCFG/

Dan Gohman gohman at apple.com
Mon Mar 1 17:11:08 PST 2010


Author: djg
Date: Mon Mar  1 19:11:08 2010
New Revision: 97531

URL: http://llvm.org/viewvc/llvm-project?rev=97531&view=rev
Log:
Floating-point add, sub, and mul are now spelled fadd, fsub, and fmul,
respectively.

Modified:
    llvm/trunk/docs/CodeGenerator.html
    llvm/trunk/docs/tutorial/LangImpl3.html
    llvm/trunk/docs/tutorial/LangImpl4.html
    llvm/trunk/docs/tutorial/LangImpl5.html
    llvm/trunk/docs/tutorial/LangImpl7.html
    llvm/trunk/docs/tutorial/OCamlLangImpl3.html
    llvm/trunk/docs/tutorial/OCamlLangImpl4.html
    llvm/trunk/docs/tutorial/OCamlLangImpl5.html
    llvm/trunk/docs/tutorial/OCamlLangImpl7.html
    llvm/trunk/lib/Target/PowerPC/README.txt
    llvm/trunk/lib/Target/X86/README-SSE.txt
    llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp
    llvm/trunk/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
    llvm/trunk/test/ExecutionEngine/2010-01-15-UndefValue.ll
    llvm/trunk/test/Transforms/InstCombine/multi-use-or.ll
    llvm/trunk/test/Transforms/InstCombine/vec_narrow.ll
    llvm/trunk/test/Transforms/SimplifyCFG/2009-06-15-InvokeCrash.ll

Modified: llvm/trunk/docs/CodeGenerator.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CodeGenerator.html?rev=97531&r1=97530&r2=97531&view=diff
==============================================================================
--- llvm/trunk/docs/CodeGenerator.html (original)
+++ llvm/trunk/docs/CodeGenerator.html Mon Mar  1 19:11:08 2010
@@ -1041,9 +1041,9 @@
 
 <div class="doc_code">
 <pre>
-%t1 = add float %W, %X
-%t2 = mul float %t1, %Y
-%t3 = add float %t2, %Z
+%t1 = fadd float %W, %X
+%t2 = fmul float %t1, %Y
+%t3 = fadd float %t2, %Z
 </pre>
 </div>
 

Modified: llvm/trunk/docs/tutorial/LangImpl3.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl3.html?rev=97531&r1=97530&r2=97531&view=diff
==============================================================================
--- llvm/trunk/docs/tutorial/LangImpl3.html (original)
+++ llvm/trunk/docs/tutorial/LangImpl3.html Mon Mar  1 19:11:08 2010
@@ -554,12 +554,12 @@
 Read function definition:
 define double @foo(double %a, double %b) {
 entry:
-        %multmp = mul double %a, %a
-        %multmp1 = mul double 2.000000e+00, %a
-        %multmp2 = mul double %multmp1, %b
-        %addtmp = add double %multmp, %multmp2
-        %multmp3 = mul double %b, %b
-        %addtmp4 = add double %addtmp, %multmp3
+        %multmp = fmul double %a, %a
+        %multmp1 = fmul double 2.000000e+00, %a
+        %multmp2 = fmul double %multmp1, %b
+        %addtmp = fadd double %multmp, %multmp2
+        %multmp3 = fmul double %b, %b
+        %addtmp4 = fadd double %addtmp, %multmp3
         ret double %addtmp4
 }
 </pre>
@@ -576,7 +576,7 @@
 entry:
         %calltmp = call double @foo( double %a, double 4.000000e+00 )
         %calltmp1 = call double @bar( double 3.133700e+04 )
-        %addtmp = add double %calltmp, %calltmp1
+        %addtmp = fadd double %calltmp, %calltmp1
         ret double %addtmp
 }
 </pre>
@@ -612,18 +612,18 @@
 
 define double @""() {
 entry:
-        %addtmp = add double 4.000000e+00, 5.000000e+00
+        %addtmp = fadd double 4.000000e+00, 5.000000e+00
         ret double %addtmp
 }
 
 define double @foo(double %a, double %b) {
 entry:
-        %multmp = mul double %a, %a
-        %multmp1 = mul double 2.000000e+00, %a
-        %multmp2 = mul double %multmp1, %b
-        %addtmp = add double %multmp, %multmp2
-        %multmp3 = mul double %b, %b
-        %addtmp4 = add double %addtmp, %multmp3
+        %multmp = fmul double %a, %a
+        %multmp1 = fmul double 2.000000e+00, %a
+        %multmp2 = fmul double %multmp1, %b
+        %addtmp = fadd double %multmp, %multmp2
+        %multmp3 = fmul double %b, %b
+        %addtmp4 = fadd double %addtmp, %multmp3
         ret double %addtmp4
 }
 
@@ -631,7 +631,7 @@
 entry:
         %calltmp = call double @foo( double %a, double 4.000000e+00 )
         %calltmp1 = call double @bar( double 3.133700e+04 )
-        %addtmp = add double %calltmp, %calltmp1
+        %addtmp = fadd double %calltmp, %calltmp1
         ret double %addtmp
 }
 

Modified: llvm/trunk/docs/tutorial/LangImpl4.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl4.html?rev=97531&r1=97530&r2=97531&view=diff
==============================================================================
--- llvm/trunk/docs/tutorial/LangImpl4.html (original)
+++ llvm/trunk/docs/tutorial/LangImpl4.html Mon Mar  1 19:11:08 2010
@@ -65,7 +65,7 @@
 Read function definition:
 define double @test(double %x) {
 entry:
-        %addtmp = add double 3.000000e+00, %x
+        %addtmp = fadd double 3.000000e+00, %x
         ret double %addtmp
 }
 </pre>
@@ -80,8 +80,8 @@
 Read function definition:
 define double @test(double %x) {
 entry:
-        %addtmp = add double 2.000000e+00, 1.000000e+00
-        %addtmp1 = add double %addtmp, %x
+        %addtmp = fadd double 2.000000e+00, 1.000000e+00
+        %addtmp1 = fadd double %addtmp, %x
         ret double %addtmp1
 }
 </pre>
@@ -113,9 +113,9 @@
 ready> Read function definition:
 define double @test(double %x) {
 entry:
-        %addtmp = add double 3.000000e+00, %x
-        %addtmp1 = add double %x, 3.000000e+00
-        %multmp = mul double %addtmp, %addtmp1
+        %addtmp = fadd double 3.000000e+00, %x
+        %addtmp1 = fadd double %x, 3.000000e+00
+        %multmp = fmul double %addtmp, %addtmp1
         ret double %multmp
 }
 </pre>
@@ -240,8 +240,8 @@
 ready> Read function definition:
 define double @test(double %x) {
 entry:
-        %addtmp = add double %x, 3.000000e+00
-        %multmp = mul double %addtmp, %addtmp
+        %addtmp = fadd double %x, 3.000000e+00
+        %multmp = fmul double %addtmp, %addtmp
         ret double %multmp
 }
 </pre>
@@ -363,8 +363,8 @@
 Read function definition:
 define double @testfunc(double %x, double %y) {
 entry:
-        %multmp = mul double %y, 2.000000e+00
-        %addtmp = add double %multmp, %x
+        %multmp = fmul double %y, 2.000000e+00
+        %addtmp = fadd double %multmp, %x
         ret double %addtmp
 }
 
@@ -411,10 +411,10 @@
 define double @foo(double %x) {
 entry:
         %calltmp = call double @sin( double %x )
-        %multmp = mul double %calltmp, %calltmp
+        %multmp = fmul double %calltmp, %calltmp
         %calltmp2 = call double @cos( double %x )
-        %multmp4 = mul double %calltmp2, %calltmp2
-        %addtmp = add double %multmp, %multmp4
+        %multmp4 = fmul double %calltmp2, %calltmp2
+        %addtmp = fadd double %multmp, %multmp4
         ret double %addtmp
 }
 

Modified: llvm/trunk/docs/tutorial/LangImpl5.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl5.html?rev=97531&r1=97530&r2=97531&view=diff
==============================================================================
--- llvm/trunk/docs/tutorial/LangImpl5.html (original)
+++ llvm/trunk/docs/tutorial/LangImpl5.html Mon Mar  1 19:11:08 2010
@@ -678,7 +678,7 @@
         ; body
 	%calltmp = call double @putchard( double 4.200000e+01 )
         ; increment
-	%nextvar = add double %i, 1.000000e+00
+	%nextvar = fadd double %i, 1.000000e+00
 
         ; termination test
 	%cmptmp = fcmp ult double %i, %n

Modified: llvm/trunk/docs/tutorial/LangImpl7.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl7.html?rev=97531&r1=97530&r2=97531&view=diff
==============================================================================
--- llvm/trunk/docs/tutorial/LangImpl7.html (original)
+++ llvm/trunk/docs/tutorial/LangImpl7.html Mon Mar  1 19:11:08 2010
@@ -557,12 +557,12 @@
 
 else:		; preds = %entry
 	<b>%x3 = load double* %x1</b>
-	%subtmp = sub double %x3, 1.000000e+00
+	%subtmp = fsub double %x3, 1.000000e+00
 	%calltmp = call double @fib( double %subtmp )
 	<b>%x4 = load double* %x1</b>
-	%subtmp5 = sub double %x4, 2.000000e+00
+	%subtmp5 = fsub double %x4, 2.000000e+00
 	%calltmp6 = call double @fib( double %subtmp5 )
-	%addtmp = add double %calltmp, %calltmp6
+	%addtmp = fadd double %calltmp, %calltmp6
 	br label %ifcont
 
 ifcont:		; preds = %else, %then
@@ -595,11 +595,11 @@
 	br label %ifcont
 
 else:
-	%subtmp = sub double <b>%x</b>, 1.000000e+00
+	%subtmp = fsub double <b>%x</b>, 1.000000e+00
 	%calltmp = call double @fib( double %subtmp )
-	%subtmp5 = sub double <b>%x</b>, 2.000000e+00
+	%subtmp5 = fsub double <b>%x</b>, 2.000000e+00
 	%calltmp6 = call double @fib( double %subtmp5 )
-	%addtmp = add double %calltmp, %calltmp6
+	%addtmp = fadd double %calltmp, %calltmp6
 	br label %ifcont
 
 ifcont:		; preds = %else, %then
@@ -625,11 +625,11 @@
 	br i1 %ifcond, label %else, label %ifcont
 
 else:
-	%subtmp = sub double %x, 1.000000e+00
+	%subtmp = fsub double %x, 1.000000e+00
 	%calltmp = call double @fib( double %subtmp )
-	%subtmp5 = sub double %x, 2.000000e+00
+	%subtmp5 = fsub double %x, 2.000000e+00
 	%calltmp6 = call double @fib( double %subtmp5 )
-	%addtmp = add double %calltmp, %calltmp6
+	%addtmp = fadd double %calltmp, %calltmp6
 	ret double %addtmp
 
 ifcont:

Modified: llvm/trunk/docs/tutorial/OCamlLangImpl3.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/OCamlLangImpl3.html?rev=97531&r1=97530&r2=97531&view=diff
==============================================================================
--- llvm/trunk/docs/tutorial/OCamlLangImpl3.html (original)
+++ llvm/trunk/docs/tutorial/OCamlLangImpl3.html Mon Mar  1 19:11:08 2010
@@ -484,7 +484,7 @@
 Read top-level expression:
 define double @""() {
 entry:
-        %addtmp = add double 4.000000e+00, 5.000000e+00
+        %addtmp = fadd double 4.000000e+00, 5.000000e+00
         ret double %addtmp
 }
 </pre>
@@ -503,12 +503,12 @@
 Read function definition:
 define double @foo(double %a, double %b) {
 entry:
-        %multmp = mul double %a, %a
-        %multmp1 = mul double 2.000000e+00, %a
-        %multmp2 = mul double %multmp1, %b
-        %addtmp = add double %multmp, %multmp2
-        %multmp3 = mul double %b, %b
-        %addtmp4 = add double %addtmp, %multmp3
+        %multmp = fmul double %a, %a
+        %multmp1 = fmul double 2.000000e+00, %a
+        %multmp2 = fmul double %multmp1, %b
+        %addtmp = fadd double %multmp, %multmp2
+        %multmp3 = fmul double %b, %b
+        %addtmp4 = fadd double %addtmp, %multmp3
         ret double %addtmp4
 }
 </pre>
@@ -525,7 +525,7 @@
 entry:
         %calltmp = call double @foo( double %a, double 4.000000e+00 )
         %calltmp1 = call double @bar( double 3.133700e+04 )
-        %addtmp = add double %calltmp, %calltmp1
+        %addtmp = fadd double %calltmp, %calltmp1
         ret double %addtmp
 }
 </pre>
@@ -561,18 +561,18 @@
 
 define double @""() {
 entry:
-        %addtmp = add double 4.000000e+00, 5.000000e+00
+        %addtmp = fadd double 4.000000e+00, 5.000000e+00
         ret double %addtmp
 }
 
 define double @foo(double %a, double %b) {
 entry:
-        %multmp = mul double %a, %a
-        %multmp1 = mul double 2.000000e+00, %a
-        %multmp2 = mul double %multmp1, %b
-        %addtmp = add double %multmp, %multmp2
-        %multmp3 = mul double %b, %b
-        %addtmp4 = add double %addtmp, %multmp3
+        %multmp = fmul double %a, %a
+        %multmp1 = fmul double 2.000000e+00, %a
+        %multmp2 = fmul double %multmp1, %b
+        %addtmp = fadd double %multmp, %multmp2
+        %multmp3 = fmul double %b, %b
+        %addtmp4 = fadd double %addtmp, %multmp3
         ret double %addtmp4
 }
 
@@ -580,7 +580,7 @@
 entry:
         %calltmp = call double @foo( double %a, double 4.000000e+00 )
         %calltmp1 = call double @bar( double 3.133700e+04 )
-        %addtmp = add double %calltmp, %calltmp1
+        %addtmp = fadd double %calltmp, %calltmp1
         ret double %addtmp
 }
 

Modified: llvm/trunk/docs/tutorial/OCamlLangImpl4.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/OCamlLangImpl4.html?rev=97531&r1=97530&r2=97531&view=diff
==============================================================================
--- llvm/trunk/docs/tutorial/OCamlLangImpl4.html (original)
+++ llvm/trunk/docs/tutorial/OCamlLangImpl4.html Mon Mar  1 19:11:08 2010
@@ -72,8 +72,8 @@
 Read function definition:
 define double @test(double %x) {
 entry:
-        %addtmp = add double 1.000000e+00, 2.000000e+00
-        %addtmp1 = add double %addtmp, %x
+        %addtmp = fadd double 1.000000e+00, 2.000000e+00
+        %addtmp1 = fadd double %addtmp, %x
         ret double %addtmp1
 }
 </pre>
@@ -104,7 +104,7 @@
 Read function definition:
 define double @test(double %x) {
 entry:
-        %addtmp = add double 3.000000e+00, %x
+        %addtmp = fadd double 3.000000e+00, %x
         ret double %addtmp
 }
 </pre>
@@ -127,9 +127,9 @@
 ready> Read function definition:
 define double @test(double %x) {
 entry:
-        %addtmp = add double 3.000000e+00, %x
-        %addtmp1 = add double %x, 3.000000e+00
-        %multmp = mul double %addtmp, %addtmp1
+        %addtmp = fadd double 3.000000e+00, %x
+        %addtmp1 = fadd double %x, 3.000000e+00
+        %multmp = fmul double %addtmp, %addtmp1
         ret double %multmp
 }
 </pre>
@@ -267,8 +267,8 @@
 ready> Read function definition:
 define double @test(double %x) {
 entry:
-        %addtmp = add double %x, 3.000000e+00
-        %multmp = mul double %addtmp, %addtmp
+        %addtmp = fadd double %x, 3.000000e+00
+        %multmp = fmul double %addtmp, %addtmp
         ret double %multmp
 }
 </pre>
@@ -388,8 +388,8 @@
 Read function definition:
 define double @testfunc(double %x, double %y) {
 entry:
-        %multmp = mul double %y, 2.000000e+00
-        %addtmp = add double %multmp, %x
+        %multmp = fmul double %y, 2.000000e+00
+        %addtmp = fadd double %multmp, %x
         ret double %addtmp
 }
 
@@ -436,10 +436,10 @@
 define double @foo(double %x) {
 entry:
         %calltmp = call double @sin( double %x )
-        %multmp = mul double %calltmp, %calltmp
+        %multmp = fmul double %calltmp, %calltmp
         %calltmp2 = call double @cos( double %x )
-        %multmp4 = mul double %calltmp2, %calltmp2
-        %addtmp = add double %multmp, %multmp4
+        %multmp4 = fmul double %calltmp2, %calltmp2
+        %addtmp = fadd double %multmp, %multmp4
         ret double %addtmp
 }
 

Modified: llvm/trunk/docs/tutorial/OCamlLangImpl5.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/OCamlLangImpl5.html?rev=97531&r1=97530&r2=97531&view=diff
==============================================================================
--- llvm/trunk/docs/tutorial/OCamlLangImpl5.html (original)
+++ llvm/trunk/docs/tutorial/OCamlLangImpl5.html Mon Mar  1 19:11:08 2010
@@ -653,7 +653,7 @@
         ; body
   %calltmp = call double @putchard( double 4.200000e+01 )
         ; increment
-  %nextvar = add double %i, 1.000000e+00
+  %nextvar = fadd double %i, 1.000000e+00
 
         ; termination test
   %cmptmp = fcmp ult double %i, %n

Modified: llvm/trunk/docs/tutorial/OCamlLangImpl7.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/OCamlLangImpl7.html?rev=97531&r1=97530&r2=97531&view=diff
==============================================================================
--- llvm/trunk/docs/tutorial/OCamlLangImpl7.html (original)
+++ llvm/trunk/docs/tutorial/OCamlLangImpl7.html Mon Mar  1 19:11:08 2010
@@ -581,12 +581,12 @@
 
 else:    ; preds = %entry
   <b>%x3 = load double* %x1</b>
-  %subtmp = sub double %x3, 1.000000e+00
+  %subtmp = fsub double %x3, 1.000000e+00
   %calltmp = call double @fib( double %subtmp )
   <b>%x4 = load double* %x1</b>
-  %subtmp5 = sub double %x4, 2.000000e+00
+  %subtmp5 = fsub double %x4, 2.000000e+00
   %calltmp6 = call double @fib( double %subtmp5 )
-  %addtmp = add double %calltmp, %calltmp6
+  %addtmp = fadd double %calltmp, %calltmp6
   br label %ifcont
 
 ifcont:    ; preds = %else, %then
@@ -619,11 +619,11 @@
   br label %ifcont
 
 else:
-  %subtmp = sub double <b>%x</b>, 1.000000e+00
+  %subtmp = fsub double <b>%x</b>, 1.000000e+00
   %calltmp = call double @fib( double %subtmp )
-  %subtmp5 = sub double <b>%x</b>, 2.000000e+00
+  %subtmp5 = fsub double <b>%x</b>, 2.000000e+00
   %calltmp6 = call double @fib( double %subtmp5 )
-  %addtmp = add double %calltmp, %calltmp6
+  %addtmp = fadd double %calltmp, %calltmp6
   br label %ifcont
 
 ifcont:    ; preds = %else, %then
@@ -649,11 +649,11 @@
   br i1 %ifcond, label %else, label %ifcont
 
 else:
-  %subtmp = sub double %x, 1.000000e+00
+  %subtmp = fsub double %x, 1.000000e+00
   %calltmp = call double @fib( double %subtmp )
-  %subtmp5 = sub double %x, 2.000000e+00
+  %subtmp5 = fsub double %x, 2.000000e+00
   %calltmp6 = call double @fib( double %subtmp5 )
-  %addtmp = add double %calltmp, %calltmp6
+  %addtmp = fadd double %calltmp, %calltmp6
   ret double %addtmp
 
 ifcont:

Modified: llvm/trunk/lib/Target/PowerPC/README.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/README.txt?rev=97531&r1=97530&r2=97531&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/README.txt (original)
+++ llvm/trunk/lib/Target/PowerPC/README.txt Mon Mar  1 19:11:08 2010
@@ -889,7 +889,7 @@
 ; recognize a more elaborate tree than a simple SETxx.
 
 define double @test_FNEG_sel(double %A, double %B, double %C) {
-        %D = sub double -0.000000e+00, %A               ; <double> [#uses=1]
+        %D = fsub double -0.000000e+00, %A               ; <double> [#uses=1]
         %Cond = fcmp ugt double %D, -0.000000e+00               ; <i1> [#uses=1]
         %E = select i1 %Cond, double %B, double %C              ; <double> [#uses=1]
         ret double %E

Modified: llvm/trunk/lib/Target/X86/README-SSE.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/README-SSE.txt?rev=97531&r1=97530&r2=97531&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/README-SSE.txt (original)
+++ llvm/trunk/lib/Target/X86/README-SSE.txt Mon Mar  1 19:11:08 2010
@@ -67,8 +67,8 @@
                                    [ %tmp.34.i18, %no_exit.i7 ]
 	%tmp.0.0.0.i10 = phi double [ 0.000000e+00, %build_tree.exit ],
                                     [ %tmp.28.i16, %no_exit.i7 ]
-	%tmp.28.i16 = add double %tmp.0.0.0.i10, 0.000000e+00
-	%tmp.34.i18 = add double %tmp.0.1.0.i9, 0.000000e+00
+	%tmp.28.i16 = fadd double %tmp.0.0.0.i10, 0.000000e+00
+	%tmp.34.i18 = fadd double %tmp.0.1.0.i9, 0.000000e+00
 	br i1 false, label %Compute_Tree.exit23, label %no_exit.i7
 
 Compute_Tree.exit23:		; preds = %no_exit.i7
@@ -97,7 +97,7 @@
 
 double %X(double %Y, double %Z, double %A, double %B) {
         %C = setlt double %A, %B
-        %z = add double %Z, 0.0    ;; select operand is not a load
+        %z = fadd double %Z, 0.0    ;; select operand is not a load
         %D = select bool %C, double %Y, double %z
         ret double %D
 }
@@ -545,7 +545,7 @@
 
 define i64 @ccosf(float %z.0, float %z.1) nounwind readonly  {
 entry:
- %tmp6 = sub float -0.000000e+00, %z.1		; <float> [#uses=1]
+ %tmp6 = fsub float -0.000000e+00, %z.1		; <float> [#uses=1]
  %tmp20 = tail call i64 @ccoshf( float %tmp6, float %z.0 ) nounwind readonly
  ret i64 %tmp20
 }

Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp?rev=97531&r1=97530&r2=97531&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineAddSub.cpp Mon Mar  1 19:11:08 2010
@@ -373,10 +373,10 @@
     if (CFP->getValueAPF().isPosZero() && CannotBeNegativeZero(LHS))
       return ReplaceInstUsesWith(I, LHS);
 
-  // Check for (add double (sitofp x), y), see if we can merge this into an
+  // Check for (fadd double (sitofp x), y), see if we can merge this into an
   // integer add followed by a promotion.
   if (SIToFPInst *LHSConv = dyn_cast<SIToFPInst>(LHS)) {
-    // (add double (sitofp x), fpcst) --> (sitofp (add int x, intcst))
+    // (fadd double (sitofp x), fpcst) --> (sitofp (add int x, intcst))
     // ... if the constant fits in the integer value.  This is useful for things
     // like (double)(x & 1234) + 4.0 -> (double)((X & 1234)+4) which no longer
     // requires a constant pool load, and generally allows the add to be better
@@ -394,7 +394,7 @@
       }
     }
     
-    // (add double (sitofp x), (sitofp y)) --> (sitofp (add int x, y))
+    // (fadd double (sitofp x), (sitofp y)) --> (sitofp (add int x, y))
     if (SIToFPInst *RHSConv = dyn_cast<SIToFPInst>(RHS)) {
       // Only do this if x/y have the same type, if at last one of them has a
       // single use (so we don't increase the number of int->fp conversions),

Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp?rev=97531&r1=97530&r2=97531&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp Mon Mar  1 19:11:08 2010
@@ -203,7 +203,7 @@
       // "In IEEE floating point, x*1 is not equivalent to x for nans.  However,
       // ANSI says we can drop signals, so we can do this anyway." (from GCC)
       if (Op1F->isExactlyValue(1.0))
-        return ReplaceInstUsesWith(I, Op0);  // Eliminate 'mul double %X, 1.0'
+        return ReplaceInstUsesWith(I, Op0);  // Eliminate 'fmul double %X, 1.0'
     } else if (Op1C->getType()->isVectorTy()) {
       if (ConstantVector *Op1V = dyn_cast<ConstantVector>(Op1C)) {
         // As above, vector X*splat(1.0) -> X in all defined cases.

Modified: llvm/trunk/test/ExecutionEngine/2010-01-15-UndefValue.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/2010-01-15-UndefValue.ll?rev=97531&r1=97530&r2=97531&view=diff
==============================================================================
--- llvm/trunk/test/ExecutionEngine/2010-01-15-UndefValue.ll (original)
+++ llvm/trunk/test/ExecutionEngine/2010-01-15-UndefValue.ll Mon Mar  1 19:11:08 2010
@@ -3,7 +3,7 @@
 
 define i32 @main() {
        %a = add i32 0, undef
-       %b = add float 0.0, undef
-       %c = add double 0.0, undef
+       %b = fadd float 0.0, undef
+       %c = fadd double 0.0, undef
        ret i32 0
 }

Modified: llvm/trunk/test/Transforms/InstCombine/multi-use-or.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/multi-use-or.ll?rev=97531&r1=97530&r2=97531&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/multi-use-or.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/multi-use-or.ll Mon Mar  1 19:11:08 2010
@@ -1,4 +1,4 @@
-; RUN: opt < %s -instcombine -S | grep {add double .sx, .sy}
+; RUN: opt < %s -instcombine -S | grep {fadd double .sx, .sy}
 ; The 'or' has multiple uses, make sure that this doesn't prevent instcombine
 ; from propagating the extends to the truncs.
 

Modified: llvm/trunk/test/Transforms/InstCombine/vec_narrow.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/vec_narrow.ll?rev=97531&r1=97530&r2=97531&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/vec_narrow.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/vec_narrow.ll Mon Mar  1 19:11:08 2010
@@ -1,5 +1,5 @@
 ; RUN: opt < %s -instcombine -S | \
-; RUN:   grep {add float}
+; RUN:   grep {fadd float}
 
         %V = type <4 x float>
 

Modified: llvm/trunk/test/Transforms/SimplifyCFG/2009-06-15-InvokeCrash.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyCFG/2009-06-15-InvokeCrash.ll?rev=97531&r1=97530&r2=97531&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SimplifyCFG/2009-06-15-InvokeCrash.ll (original)
+++ llvm/trunk/test/Transforms/SimplifyCFG/2009-06-15-InvokeCrash.ll Mon Mar  1 19:11:08 2010
@@ -144,11 +144,11 @@
 	store double %tmp64, double* %tmp62
 	%tmp65 = call double* @_ZN6QSizeF6rwidthEv( %struct.QPointF* %scaledPageSize )		; <double*> [#uses=2]
 	%tmp67 = load double* %tmp65		; <double> [#uses=1]
-	%tmp69 = mul double %tmp67, %tmp48		; <double> [#uses=1]
+	%tmp69 = fmul double %tmp67, %tmp48		; <double> [#uses=1]
 	store double %tmp69, double* %tmp65
 	%tmp71 = call double* @_ZN6QSizeF7rheightEv( %struct.QPointF* %scaledPageSize )		; <double*> [#uses=2]
 	%tmp73 = load double* %tmp71		; <double> [#uses=1]
-	%tmp75 = mul double %tmp73, %tmp54		; <double> [#uses=1]
+	%tmp75 = fmul double %tmp73, %tmp54		; <double> [#uses=1]
 	store double %tmp75, double* %tmp71
 	%tmp78 = getelementptr %struct.QPrinter* %printer, i32 0, i32 0		; <%struct.QPaintDevice*> [#uses=1]
 	%tmp80 = invoke i32 @_ZNK12QPaintDevice6heightEv( %struct.QPaintDevice* %tmp78 )
@@ -190,7 +190,7 @@
 			to label %invcont106 unwind label %cleanup329		; <i32> [#uses=1]
 invcont106:		; preds = %invcont104
 	%tmp108 = sitofp i32 %tmp107 to double		; <double> [#uses=1]
-	%tmp109 = mul double %tmp108, 0x3FE93264C993264C		; <double> [#uses=1]
+	%tmp109 = fmul double %tmp108, 0x3FE93264C993264C		; <double> [#uses=1]
 	%tmp109.upgrd.17 = fptosi double %tmp109 to i32		; <i32> [#uses=3]
 	%tmp.upgrd.18 = call %struct.QTextBlockGroup* @_ZNK13QTextDocument9rootFrameEv( %struct.QAbstractTextDocumentLayout* %tmp95 )		; <%struct.QTextBlockGroup*> [#uses=1]
 	invoke void @_ZNK10QTextFrame11frameFormatEv( %struct.QTextBlockFormat* sret  %fmt, %struct.QTextBlockGroup* %tmp.upgrd.18 )
@@ -237,7 +237,7 @@
 	store double %tmp137, double* %tmp135
 	%tmp138 = call double @_ZNK6QRectF6heightEv( %struct.QRectF* %body )		; <double> [#uses=1]
 	%tmp139 = sitofp i32 %tmp109.upgrd.17 to double		; <double> [#uses=1]
-	%tmp140 = sub double %tmp138, %tmp139		; <double> [#uses=1]
+	%tmp140 = fsub double %tmp138, %tmp139		; <double> [#uses=1]
 	%tmp142 = invoke %struct.QPaintDevice* @_ZNK8QPainter6deviceEv( %struct.QPainter* %p )
 			to label %invcont141 unwind label %cleanup192		; <%struct.QPaintDevice*> [#uses=1]
 invcont141:		; preds = %invcont124
@@ -251,7 +251,7 @@
 			to label %invcont148 unwind label %cleanup168		; <i32> [#uses=1]
 invcont148:		; preds = %invcont146
 	%tmp149.upgrd.21 = sitofp i32 %tmp149 to double		; <double> [#uses=1]
-	%tmp150 = add double %tmp140, %tmp149.upgrd.21		; <double> [#uses=1]
+	%tmp150 = fadd double %tmp140, %tmp149.upgrd.21		; <double> [#uses=1]
 	%tmp152 = invoke %struct.QPaintDevice* @_ZNK8QPainter6deviceEv( %struct.QPainter* %p )
 			to label %invcont151 unwind label %cleanup168		; <%struct.QPaintDevice*> [#uses=1]
 invcont151:		; preds = %invcont148
@@ -261,10 +261,10 @@
 	%tmp155 = mul i32 %tmp154, 5		; <i32> [#uses=1]
 	%tmp156 = sdiv i32 %tmp155, 72		; <i32> [#uses=1]
 	%tmp156.upgrd.22 = sitofp i32 %tmp156 to double		; <double> [#uses=1]
-	%tmp157 = add double %tmp150, %tmp156.upgrd.22		; <double> [#uses=1]
+	%tmp157 = fadd double %tmp150, %tmp156.upgrd.22		; <double> [#uses=1]
 	%tmp158 = call double @_ZNK6QRectF5widthEv( %struct.QRectF* %body )		; <double> [#uses=1]
 	%tmp159 = sitofp i32 %tmp109.upgrd.17 to double		; <double> [#uses=1]
-	%tmp160 = sub double %tmp158, %tmp159		; <double> [#uses=1]
+	%tmp160 = fsub double %tmp158, %tmp159		; <double> [#uses=1]
 	call void @_ZN7QPointFC1Edd( %struct.QPointF* %tmp2, double %tmp160, double %tmp157 )
 	%tmp161 = getelementptr %struct.QPointF* %pageNumberPos, i32 0, i32 0		; <double*> [#uses=1]
 	%tmp162 = getelementptr %struct.QPointF* %tmp2, i32 0, i32 0		; <double*> [#uses=1]





More information about the llvm-commits mailing list