diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-26 18:21:23 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-26 18:21:23 +0000 |
commit | 8581c260d3595fd78ce9f1585c85bea545fce5f3 (patch) | |
tree | 33c0ee9b3113d1d2bd588eeee5cf23387a36bb00 /test/Transforms/SCCP/undef-resolve.ll | |
parent | 095539f97c5f395fdceaea4d979be24a2eded359 (diff) | |
download | external_llvm-8581c260d3595fd78ce9f1585c85bea545fce5f3.zip external_llvm-8581c260d3595fd78ce9f1585c85bea545fce5f3.tar.gz external_llvm-8581c260d3595fd78ce9f1585c85bea545fce5f3.tar.bz2 |
fix PR6940: sitofp(undef) folds to 0.0, not undef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102358 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/SCCP/undef-resolve.ll')
-rw-r--r-- | test/Transforms/SCCP/undef-resolve.ll | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/test/Transforms/SCCP/undef-resolve.ll b/test/Transforms/SCCP/undef-resolve.ll index d2f3d02..bed561c 100644 --- a/test/Transforms/SCCP/undef-resolve.ll +++ b/test/Transforms/SCCP/undef-resolve.ll @@ -1,8 +1,19 @@ ; RUN: opt %s -sccp -S | FileCheck %s + + +; PR6940 +define double @test1() { + %t = sitofp i32 undef to double + ret double %t +; CHECK: @test1 +; CHECK: ret double 0.0 +} + + ; rdar://7832370 ; Check that lots of stuff doesn't get turned into undef. - -define i32 @main() nounwind readnone ssp { +define i32 @test2() nounwind readnone ssp { +; CHECK: @test2 init: br label %control.outer.outer |