summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-02-19 22:42:40 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-02-19 22:42:40 +0000
commitef200db4fd1313050dca45d71469c82ba02037e0 (patch)
treef69d0db15af38b19c820cbef04107ae759d06530 /llvm/test
parent5b05454f248760f64b79109686c87f1c43f0d731 (diff)
downloadbcm5719-llvm-ef200db4fd1313050dca45d71469c82ba02037e0.tar.gz
bcm5719-llvm-ef200db4fd1313050dca45d71469c82ba02037e0.zip
PR9218: SimplifyDemandedVectorElts can return a non-null value that is not
the instruction passed in. Make sure to account for this correctly, instead of looping infinitely. llvm-svn: 126058
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Transforms/InstCombine/2011-02-16-InsertelementHang.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/2011-02-16-InsertelementHang.ll b/llvm/test/Transforms/InstCombine/2011-02-16-InsertelementHang.ll
new file mode 100644
index 00000000000..2f6034e158a
--- /dev/null
+++ b/llvm/test/Transforms/InstCombine/2011-02-16-InsertelementHang.ll
@@ -0,0 +1,11 @@
+; RUN: opt < %s -instcombine -S | FileCheck %s
+; PR9218
+
+%vec2x2 = type { <2 x double>, <2 x double> }
+
+define %vec2x2 @split(double) nounwind alwaysinline {
+; CHECK: @split
+; CHECK: ret %vec2x2 undef
+ %vba = insertelement <2 x double> undef, double %0, i32 2
+ ret <2 x double> %vba, <2 x double> %vba
+}
OpenPOWER on IntegriCloud