summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSilviu Baranga <silviu.baranga@arm.com>2012-09-05 08:57:21 +0000
committerSilviu Baranga <silviu.baranga@arm.com>2012-09-05 08:57:21 +0000
commit3d5e161fe45f9553009c0377a5689324aab1c64a (patch)
tree5156d034f65328336e5d50af9bae512624f7df9d /test
parent59a4a47a7bea7cc17877c6a3954ad9f8309ff1cb (diff)
downloadllvm-3d5e161fe45f9553009c0377a5689324aab1c64a.tar.gz
llvm-3d5e161fe45f9553009c0377a5689324aab1c64a.tar.bz2
llvm-3d5e161fe45f9553009c0377a5689324aab1c64a.tar.xz
Fixed the DAG combiner to better handle the folding of AND nodes for vector types. The previous code was making the assumption that the length of the bitmask returned by isConstantSplat was equal to the size of the vector type. Now we first make sure that the splat value has at least the length of the vector lane type, then we only use as many fields as we have available in the splat value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163203 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/ARM/vector-extend-narrow.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/vector-extend-narrow.ll b/test/CodeGen/ARM/vector-extend-narrow.ll
index 8fd3db2919..22af797621 100644
--- a/test/CodeGen/ARM/vector-extend-narrow.ll
+++ b/test/CodeGen/ARM/vector-extend-narrow.ll
@@ -62,3 +62,14 @@ define <4 x i8> @i(<4 x i8>* %x) {
%2 = sdiv <4 x i8> zeroinitializer, %1
ret <4 x i8> %2
}
+; CHECK: j:
+define <4 x i32> @j(<4 x i8>* %in) nounwind {
+ ; CHECK: vld1
+ ; CHECK: vmovl.u8
+ ; CHECK: vmovl.u16
+ ; CHECK-NOT: vand
+ %1 = load <4 x i8>* %in, align 4
+ %2 = zext <4 x i8> %1 to <4 x i32>
+ ret <4 x i32> %2
+}
+