aboutsummaryrefslogtreecommitdiffstats
path: root/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
commit081c29b25696006bb72a7ac1035e05f8f935513f (patch)
treeea822453b96ad4c3ac4f1901e5d1cc51360e4cd5 /lib/Transforms/InstCombine/InstCombineVectorOps.cpp
parent37d093f0b0e4b4d1c49efbf2bdcc9827527e3b9f (diff)
downloadexternal_llvm-081c29b25696006bb72a7ac1035e05f8f935513f.zip
external_llvm-081c29b25696006bb72a7ac1035e05f8f935513f.tar.gz
external_llvm-081c29b25696006bb72a7ac1035e05f8f935513f.tar.bz2
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172788 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombineVectorOps.cpp')
-rw-r--r--lib/Transforms/InstCombine/InstCombineVectorOps.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineVectorOps.cpp b/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
index 1bbedb8..4f71db1 100644
--- a/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
+++ b/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) {