diff options
author | Chris Lattner <sabre@nondot.org> | 2008-08-06 05:13:06 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-08-06 05:13:06 +0000 |
commit | 5af5f463e1b95e2af8d69591d07282427c2dc6a4 (patch) | |
tree | 88716c0b14c225f7e1537da7e37cfb4eba0b4b3d /test/Transforms | |
parent | b30591ec646b5f53c1163bf9bd74091248598589 (diff) | |
download | external_llvm-5af5f463e1b95e2af8d69591d07282427c2dc6a4.zip external_llvm-5af5f463e1b95e2af8d69591d07282427c2dc6a4.tar.gz external_llvm-5af5f463e1b95e2af8d69591d07282427c2dc6a4.tar.bz2 |
Zap sitofp/fptoui pairs. In all cases when the sign difference
matters, the result is undefined anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54396 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r-- | test/Transforms/InstCombine/sitofp.ll | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/Transforms/InstCombine/sitofp.ll b/test/Transforms/InstCombine/sitofp.ll index 73dd23b..c26c351 100644 --- a/test/Transforms/InstCombine/sitofp.ll +++ b/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 +} + |