summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2019-06-02 22:52:34 +0000
committerCraig Topper <craig.topper@intel.com>2019-06-02 22:52:34 +0000
commit5f79d749466239f1d9cc55871c9f5c6cc2451bab (patch)
tree464979a8cef0d32f0ac4a71ccd8b82c8e42117cd /llvm/lib/CodeGen
parent162360774ed9c1922820d2afa2d6cd39983e90d5 (diff)
downloadbcm5719-llvm-5f79d749466239f1d9cc55871c9f5c6cc2451bab.tar.gz
bcm5719-llvm-5f79d749466239f1d9cc55871c9f5c6cc2451bab.zip
[X86] Add test cases for masked store and masked scatter with an all zeroes mask. Fix bug in ScalarizeMaskedMemIntrin
Need to cast only to Constant instead of ConstantVector to allow ConstantAggregateZero. llvm-svn: 362341
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp b/llvm/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp
index e2ee9f28f3b..7776dffb4e9 100644
--- a/llvm/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp
+++ b/llvm/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp
@@ -488,7 +488,7 @@ static void scalarizeMaskedScatter(CallInst *CI, bool &ModifiedDT) {
// Shorten the way if the mask is a vector of constants.
if (isConstantIntVector(Mask)) {
for (unsigned Idx = 0; Idx < VectorWidth; ++Idx) {
- if (cast<ConstantVector>(Mask)->getAggregateElement(Idx)->isNullValue())
+ if (cast<Constant>(Mask)->getAggregateElement(Idx)->isNullValue())
continue;
Value *OneElt =
Builder.CreateExtractElement(Src, Idx, "Elt" + Twine(Idx));
OpenPOWER on IntegriCloud