Move a DenseMap's declaration outside of a loop, and just call
[oota-llvm.git] / test / Transforms / InstCombine / sitofp.ll
index fd06dea47bf54ce1409a8d9b757b926068b01a12..73dd23bc434da3483a87a318a3c9bae9795a8bc6 100644 (file)
@@ -23,3 +23,21 @@ define i1 @test4(i8 %A) {
   ret i1 %C  ;  A != 127
 }
 
+define i32 @test5(i32 %A) {
+  %B = sitofp i32 %A to double
+  %C = fptosi double %B to i32
+  %D = uitofp i32 %C to double
+  %E = fptoui double %D to i32
+  ret i32 %E
+}
+
+define i32 @test6(i32 %A) {
+       %B = and i32 %A, 7              ; <i32> [#uses=1]
+       %C = and i32 %A, 32             ; <i32> [#uses=1]
+       %D = sitofp i32 %B to double            ; <double> [#uses=1]
+       %E = sitofp i32 %C to double            ; <double> [#uses=1]
+       %F = add double %D, %E          ; <double> [#uses=1]
+       %G = fptosi double %F to i32            ; <i32> [#uses=1]
+       ret i32 %G
+}
+