[llvm] r337890 - [X86] Use X86ISD::MUL_IMM instead of ISD::MUL for multiply we intend to be selected to LEA.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 24 22:33:36 PDT 2018
Author: ctopper
Date: Tue Jul 24 22:33:36 2018
New Revision: 337890
URL: http://llvm.org/viewvc/llvm-project?rev=337890&view=rev
Log:
[X86] Use X86ISD::MUL_IMM instead of ISD::MUL for multiply we intend to be selected to LEA.
This prevents other combines from possibly disturbing it.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=337890&r1=337889&r2=337890&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Jul 24 22:33:36 2018
@@ -33701,7 +33701,8 @@ static SDValue combineMulSpecial(uint64_
auto combineMulMulAddOrSub = [&](int Mul1, int Mul2, bool isAdd) {
SDValue Result = DAG.getNode(X86ISD::MUL_IMM, DL, VT, N->getOperand(0),
DAG.getConstant(Mul1, DL, VT));
- Result = DAG.getNode(ISD::MUL, DL, VT, Result, DAG.getConstant(Mul2, DL, VT));
+ Result = DAG.getNode(X86ISD::MUL_IMM, DL, VT, Result,
+ DAG.getConstant(Mul2, DL, VT));
Result = DAG.getNode(isAdd ? ISD::ADD : ISD::SUB, DL, VT, Result,
N->getOperand(0));
return Result;
More information about the llvm-commits
mailing list