summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/sitofp.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms/InstCombine/sitofp.ll')
-rw-r--r--llvm/test/Transforms/InstCombine/sitofp.ll14
1 files changed, 13 insertions, 1 deletions
diff --git a/llvm/test/Transforms/InstCombine/sitofp.ll b/llvm/test/Transforms/InstCombine/sitofp.ll
index 73dd23bc434..c26c351a741 100644
--- a/llvm/test/Transforms/InstCombine/sitofp.ll
+++ b/llvm/test/Transforms/InstCombine/sitofp.ll
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep sitofp
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep itofp
define i1 @test1(i8 %A) {
%B = sitofp i8 %A to double
@@ -41,3 +41,15 @@ define i32 @test6(i32 %A) {
ret i32 %G
}
+define i32 @test7(i32 %a) nounwind {
+ %b = sitofp i32 %a to double ; <double> [#uses=1]
+ %c = fptoui double %b to i32 ; <i32> [#uses=1]
+ ret i32 %c
+}
+
+define i32 @test8(i32 %a) nounwind {
+ %b = uitofp i32 %a to double ; <double> [#uses=1]
+ %c = fptosi double %b to i32 ; <i32> [#uses=1]
+ ret i32 %c
+}
+
OpenPOWER on IntegriCloud