summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2016-07-07 06:11:07 +0000
committerCraig Topper <craig.topper@gmail.com>2016-07-07 06:11:07 +0000
commitd5d2a35013cdac72be85b409a53c248d58f612b5 (patch)
treeaa1b1257a75d11929b4f1ec868691054c7e57e42 /llvm/lib
parentfc1e969dfc94e0e78cc1bd3b3ebd5e81bbb56ffb (diff)
downloadbcm5719-llvm-d5d2a35013cdac72be85b409a53c248d58f612b5.tar.gz
bcm5719-llvm-d5d2a35013cdac72be85b409a53c248d58f612b5.zip
[AVX512] Zero extend the result of vpcmpeq/vpcmpgt and similar intrinsics in the autoupgrade code. This currently results in worse codegen but is needed for correctness.
llvm-svn: 274736
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/IR/AutoUpgrade.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp
index 8fee0f35c35..468644314e3 100644
--- a/llvm/lib/IR/AutoUpgrade.cpp
+++ b/llvm/lib/IR/AutoUpgrade.cpp
@@ -601,8 +601,9 @@ static Value *upgradeMaskedCompare(IRBuilder<> &Builder, CallInst &CI,
for (unsigned i = 0; i != NumElts; ++i)
Indices[i] = i;
for (unsigned i = NumElts; i != 8; ++i)
- Indices[i] = NumElts;
- Cmp = Builder.CreateShuffleVector(Cmp, UndefValue::get(Cmp->getType()),
+ Indices[i] = NumElts + i % NumElts;
+ Cmp = Builder.CreateShuffleVector(Cmp,
+ Constant::getNullValue(Cmp->getType()),
Indices);
}
return Builder.CreateBitCast(Cmp, IntegerType::get(CI.getContext(),
OpenPOWER on IntegriCloud