diff options
author | Owen Anderson <resistor@mac.com> | 2010-07-19 08:14:26 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2010-07-19 08:14:26 +0000 |
commit | 3ccd81864f1a78ef7f8fda39db6e2bc8a534742d (patch) | |
tree | 91ef3463ca0682438d0e4d00b51c2ac0049c6bdd /llvm | |
parent | 9c271e28357e1ac89b0eeb9396f73b90aa099bb7 (diff) | |
download | bcm5719-llvm-3ccd81864f1a78ef7f8fda39db6e2bc8a534742d.tar.gz bcm5719-llvm-3ccd81864f1a78ef7f8fda39db6e2bc8a534742d.zip |
Testcase for r108687.
llvm-svn: 108689
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/test/Transforms/InstCombine/2010-07-19-sqrt.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/2010-07-19-sqrt.ll b/llvm/test/Transforms/InstCombine/2010-07-19-sqrt.ll new file mode 100644 index 00000000000..65053820482 --- /dev/null +++ b/llvm/test/Transforms/InstCombine/2010-07-19-sqrt.ll @@ -0,0 +1,16 @@ +; RUN: opt -S -instcombine %s | FileCheck %s + +define float @foo(float %x) nounwind readnone ssp { +entry: +; CHECK-NOT: fpext +; CHECK-NOT: sqrt( +; CHECK: sqrtf( +; CHECK-NOT: fptrunc + %conv = fpext float %x to double ; <double> [#uses=1] + %call = tail call double @sqrt(double %conv) nounwind ; <double> [#uses=1] + %conv1 = fptrunc double %call to float ; <float> [#uses=1] +; CHECK: ret float + ret float %conv1 +} + +declare double @sqrt(double) readnone |