summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2013-01-18 05:30:07 +0000
committerCraig Topper <craig.topper@gmail.com>2013-01-18 05:30:07 +0000
commit45d9f4b569d388a66bbc7f99fdc4778195a7f89b (patch)
tree9cc34b0290425ce51e611227f370b4a92dc01308 /llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
parente3025672e9b59cfb5e13886fa05507f824017685 (diff)
downloadbcm5719-llvm-45d9f4b569d388a66bbc7f99fdc4778195a7f89b.tar.gz
bcm5719-llvm-45d9f4b569d388a66bbc7f99fdc4778195a7f89b.zip
Check for less than 0 in shuffle mask instead of -1. It's more consistent with other code related to shuffles and easier to implement in compiled code.
llvm-svn: 172788
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
index 1bbedb8e9d0..4f71db1a4b0 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
@@ -604,7 +604,7 @@ Instruction *InstCombiner::visitShuffleVectorInst(ShuffleVectorInst &SVI) {
// ShuffleVectorInst is equivalent to the original one.
for (unsigned i = 0; i < VWidth; ++i) {
int eltMask;
- if (Mask[i] == -1) {
+ if (Mask[i] < 0) {
// This element is an undef value.
eltMask = -1;
} else if (Mask[i] < (int)LHSWidth) {
OpenPOWER on IntegriCloud