summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp2
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp6
2 files changed, 1 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
index 07ee3c032c2..6b03b682bca 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -520,7 +520,7 @@ static Value *simplifyX86muldq(const IntrinsicInst &II,
ResTy->getScalarSizeInBits() == 64 && "Unexpected muldq/muludq types");
// muldq/muludq(undef, undef) -> zero (matches generic mul behavior)
- if (isa<UndefValue>(Arg0) && isa<UndefValue>(Arg1))
+ if (isa<UndefValue>(Arg0) || isa<UndefValue>(Arg1))
return ConstantAggregateZero::get(ResTy);
// Constant folding.
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp b/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
index e625f804a23..fb7177f1ddb 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
@@ -1469,12 +1469,6 @@ Value *InstCombiner::SimplifyDemandedVectorElts(Value *V, APInt DemandedElts,
Depth + 1);
if (TmpV) { II->setArgOperand(1, TmpV); MadeChange = true; }
- // Output elements are undefined if both are undefined. Consider things
- // like undef*0. The result is known zero, not undef.
- for (unsigned i = 0; i != VWidth; ++i)
- if (UndefElts2[i * 2] && UndefElts3[i * 2])
- UndefElts.setBit(i);
-
break;
}
OpenPOWER on IntegriCloud