diff options
author | Chris Lattner <sabre@nondot.org> | 2008-05-19 20:25:04 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-05-19 20:25:04 +0000 |
commit | deef1a72f6f44ba143922414b1490a5bb03d79a0 (patch) | |
tree | 96910ee44d3414fabf6b386aea966907128f8224 /test/Transforms | |
parent | e6b62d988e02bb7d759214e3fd90e01cbe1a570b (diff) | |
download | external_llvm-deef1a72f6f44ba143922414b1490a5bb03d79a0.zip external_llvm-deef1a72f6f44ba143922414b1490a5bb03d79a0.tar.gz external_llvm-deef1a72f6f44ba143922414b1490a5bb03d79a0.tar.bz2 |
convert fptosi(sitofp x) -> x if the fp value has enough bits in its mantissa
to accurately represent the integer. This triggers 9 times in 471.omnetpp,
though 8 of those seem to be inlined from the same place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51271 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r-- | test/Transforms/InstCombine/sitofp.ll | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/sitofp.ll b/test/Transforms/InstCombine/sitofp.ll index fd06dea..f7b1c91 100644 --- a/test/Transforms/InstCombine/sitofp.ll +++ b/test/Transforms/InstCombine/sitofp.ll @@ -23,3 +23,11 @@ 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 +} + |