diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp index 2ab07eb42a2..9f9bf4094c5 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp @@ -515,9 +515,9 @@ static Value *simplifyX86muldq(const IntrinsicInst &II) { Value *Arg1 = II.getArgOperand(1); Type *ResTy = II.getType(); - // muldq/muludq(undef, undef) -> undef + // muldq/muludq(undef, undef) -> zero (matches generic mul behavior) if (isa<UndefValue>(Arg0) && isa<UndefValue>(Arg1)) - return UndefValue::get(ResTy); + return ConstantAggregateZero::get(ResTy); return nullptr; } |