diff options
author | Serge Pavlov <sepavloff@gmail.com> | 2014-05-12 10:11:27 +0000 |
---|---|---|
committer | Serge Pavlov <sepavloff@gmail.com> | 2014-05-12 10:11:27 +0000 |
commit | b1a6b91a1e833fcccae5d2c367f5dd29d4ea6fdd (patch) | |
tree | 169db97dae1a249d816b9db049ee16fc122fdc57 /test/Transforms/InstCombine | |
parent | f1e04540f67e686ef1b1cf858e64797500a4012d (diff) | |
download | llvm-b1a6b91a1e833fcccae5d2c367f5dd29d4ea6fdd.tar.gz llvm-b1a6b91a1e833fcccae5d2c367f5dd29d4ea6fdd.tar.bz2 llvm-b1a6b91a1e833fcccae5d2c367f5dd29d4ea6fdd.tar.xz |
Fix type of shuffle obtained from reordering with binary operation
In transformation:
BinOp(shuffle(v1,undef), shuffle(v2,undef)) -> shuffle(BinOp(v1, v2),undef)
type of the undef argument must be same as type of BinOp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208531 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine')
-rw-r--r-- | test/Transforms/InstCombine/vec_shuffle.ll | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/vec_shuffle.ll b/test/Transforms/InstCombine/vec_shuffle.ll index 79377a1876..a3f7f79624 100644 --- a/test/Transforms/InstCombine/vec_shuffle.ll +++ b/test/Transforms/InstCombine/vec_shuffle.ll @@ -375,3 +375,14 @@ define <2 x i32> @pr19717(<4 x i32> %in0, <2 x i32> %in1) { %mul = mul <2 x i32> %shuffle, %shuffle4 ret <2 x i32> %mul } + +define <4 x i16> @pr19717a(<8 x i16> %in0, <8 x i16> %in1) { +; CHECK-LABEL: @pr19717a( +; CHECK: [[VAR1:%[a-zA-Z0-9.]+]] = mul <8 x i16> %in0, %in1 +; CHECK: [[VAR2:%[a-zA-Z0-9.]+]] = shufflevector <8 x i16> [[VAR1]], <8 x i16> undef, <4 x i32> <i32 5, i32 5, i32 5, i32 5> +; CHECK: ret <4 x i16> [[VAR2]] + %shuffle = shufflevector <8 x i16> %in0, <8 x i16> %in0, <4 x i32> <i32 5, i32 5, i32 5, i32 5> + %shuffle1 = shufflevector <8 x i16> %in1, <8 x i16> %in1, <4 x i32> <i32 5, i32 5, i32 5, i32 5> + %mul = mul <4 x i16> %shuffle, %shuffle1 + ret <4 x i16> %mul +} |