summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/sitofp.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/InstCombine/sitofp.ll')
-rw-r--r--test/Transforms/InstCombine/sitofp.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/sitofp.ll b/test/Transforms/InstCombine/sitofp.ll
index f7b1c91565..73dd23bc43 100644
--- a/test/Transforms/InstCombine/sitofp.ll
+++ b/test/Transforms/InstCombine/sitofp.ll
@@ -31,3 +31,13 @@ define i32 @test5(i32 %A) {
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
+}
+