[llvm] r328931 - [X86] Don't check for folding into a store when deciding if we can promote an i16 mul.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 31 23:29:32 PDT 2018
Author: ctopper
Date: Sat Mar 31 23:29:32 2018
New Revision: 328931
URL: http://llvm.org/viewvc/llvm-project?rev=328931&view=rev
Log:
[X86] Don't check for folding into a store when deciding if we can promote an i16 mul.
There's no RMW mul operation.
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=328931&r1=328930&r2=328931&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sat Mar 31 23:29:32 2018
@@ -38755,10 +38755,12 @@ bool X86TargetLowering::IsDesirableToPro
SDValue N1 = Op.getOperand(1);
// Avoid disabling potential load folding opportunities.
if (MayFoldLoad(N1) &&
- (!Commute || !isa<ConstantSDNode>(N0) || IsFoldableRMW(N1, Op)))
+ (!Commute || !isa<ConstantSDNode>(N0) ||
+ (Op.getOpcode() != ISD::MUL && IsFoldableRMW(N1, Op))))
return false;
if (MayFoldLoad(N0) &&
- ((Commute && !isa<ConstantSDNode>(N1)) || IsFoldableRMW(N0, Op)))
+ ((Commute && !isa<ConstantSDNode>(N1)) ||
+ (Op.getOpcode() != ISD::MUL && IsFoldableRMW(N0, Op))))
return false;
}
}
More information about the llvm-commits
mailing list