From 69b2652665e047fcbb291fe2e9817f4599b53692 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 25 Oct 2018 07:00:09 +0000 Subject: [PATCH] [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. llvm-svn: 345241 --- lib/Target/X86/X86ISelLowering.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index d86f9d5a220..f9f8fb4a419 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -31881,7 +31881,8 @@ bool X86TargetLowering::SimplifyDemandedBitsForTargetNode( 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))