summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-07-17 06:07:20 +0000
committerChris Lattner <sabre@nondot.org>2008-07-17 06:07:20 +0000
commitd137ab47832768b416453ee3e3a568faefa77852 (patch)
tree52138af43bb893e2aea4ab88dd62095170114531 /test/Transforms/InstCombine
parentf595266b91ea5aef953ce3019557a5f3d3291ff9 (diff)
downloadllvm-d137ab47832768b416453ee3e3a568faefa77852.tar.gz
llvm-d137ab47832768b416453ee3e3a568faefa77852.tar.bz2
llvm-d137ab47832768b416453ee3e3a568faefa77852.tar.xz
Fix PR2553
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53715 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine')
-rw-r--r--test/Transforms/InstCombine/2008-07-16-fsub.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/2008-07-16-fsub.ll b/test/Transforms/InstCombine/2008-07-16-fsub.ll
new file mode 100644
index 0000000000..1d0554d181
--- /dev/null
+++ b/test/Transforms/InstCombine/2008-07-16-fsub.ll
@@ -0,0 +1,8 @@
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep sub
+; PR2553
+
+define double @test(double %X) nounwind {
+ ; fsub of self can't be optimized away.
+ %Y = sub double %X, %X
+ ret double %Y
+}