Fix 9173.
Add more folding patterns to constant expressions of vector selects and vector
bitcasts.
llvm-svn: 125393
diff --git a/llvm/test/Transforms/InstCombine/bitcast-vec-uniform.ll b/llvm/test/Transforms/InstCombine/bitcast-vec-uniform.ll
new file mode 100644
index 0000000..1fba163
--- /dev/null
+++ b/llvm/test/Transforms/InstCombine/bitcast-vec-uniform.ll
@@ -0,0 +1,14 @@
+; RUN: opt < %s -instcombine -S | not grep bitcast
+
+define <4 x i32> @a(<1 x i64> %y) {
+ %c = bitcast <2 x i64> <i64 0, i64 0> to <4 x i32>
+ ret <4 x i32> %c
+}
+
+define <4 x i32> @b(<1 x i64> %y) {
+ %c = bitcast <2 x i64> <i64 -1, i64 -1> to <4 x i32>
+ ret <4 x i32> %c
+}
+
+
+