[llvm] r345241 - [X86] Don't use the OriginalDemandedBits to calculate the DemandedMask for PMULUDQ/PMULDQ inputs.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 25 00:00:09 PDT 2018
Author: ctopper
Date: Thu Oct 25 00:00:09 2018
New Revision: 345241
URL: http://llvm.org/viewvc/llvm-project?rev=345241&view=rev
Log:
[X86] Don't use the OriginalDemandedBits to calculate the DemandedMask for PMULUDQ/PMULDQ inputs.
Multiply a is complex operation so just because some bit of the output isn't used doesn't mean that bit of the input isn't used.
We might able to bound it, but it will require some more thought.
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=345241&r1=345240&r2=345241&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Thu Oct 25 00:00:09 2018
@@ -31881,7 +31881,8 @@ bool X86TargetLowering::SimplifyDemanded
KnownBits KnownOp;
SDValue LHS = Op.getOperand(0);
SDValue RHS = Op.getOperand(1);
- APInt DemandedMask = OriginalDemandedBits & APInt::getLowBitsSet(64, 32);
+ // FIXME: Can we bound this better?
+ APInt DemandedMask = APInt::getLowBitsSet(64, 32);
if (SimplifyDemandedBits(LHS, DemandedMask, KnownOp, TLO, Depth + 1))
return true;
if (SimplifyDemandedBits(RHS, DemandedMask, KnownOp, TLO, Depth + 1))
More information about the llvm-commits
mailing list