[llvm] r349909 - [ARM] Always use the version of computeKnownBits that returns a value. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 21 07:15:38 PST 2018
Author: rksimon
Date: Fri Dec 21 07:15:38 2018
New Revision: 349909
URL: http://llvm.org/viewvc/llvm-project?rev=349909&view=rev
Log:
[ARM] Always use the version of computeKnownBits that returns a value. NFCI.
Continues the work started by @bogner in rL340594 to remove uses of the KnownBits output paramater version.
Modified:
llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=349909&r1=349908&r2=349909&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Fri Dec 21 07:15:38 2018
@@ -12576,8 +12576,7 @@ SDValue ARMTargetLowering::PerformCMOVTo
// Lastly, can we determine that the bits defined by OrCI
// are zero in Y?
- KnownBits Known;
- DAG.computeKnownBits(Y, Known);
+ KnownBits Known = DAG.computeKnownBits(Y);
if ((OrCI & Known.Zero) != OrCI)
return SDValue();
@@ -12807,8 +12806,7 @@ ARMTargetLowering::PerformCMOVCombine(SD
}
if (Res.getNode()) {
- KnownBits Known;
- DAG.computeKnownBits(SDValue(N,0), Known);
+ KnownBits Known = DAG.computeKnownBits(SDValue(N,0));
// Capture demanded bits information that would be otherwise lost.
if (Known.Zero == 0xfffffffe)
Res = DAG.getNode(ISD::AssertZext, dl, MVT::i32, Res,
@@ -13599,12 +13597,11 @@ void ARMTargetLowering::computeKnownBits
break;
case ARMISD::CMOV: {
// Bits are known zero/one if known on the LHS and RHS.
- DAG.computeKnownBits(Op.getOperand(0), Known, Depth+1);
+ Known = DAG.computeKnownBits(Op.getOperand(0), Depth+1);
if (Known.isUnknown())
return;
- KnownBits KnownRHS;
- DAG.computeKnownBits(Op.getOperand(1), KnownRHS, Depth+1);
+ KnownBits KnownRHS = DAG.computeKnownBits(Op.getOperand(1), Depth+1);
Known.Zero &= KnownRHS.Zero;
Known.One &= KnownRHS.One;
return;
@@ -13626,7 +13623,7 @@ void ARMTargetLowering::computeKnownBits
case ARMISD::BFI: {
// Conservatively, we can recurse down the first operand
// and just mask out all affected bits.
- DAG.computeKnownBits(Op.getOperand(0), Known, Depth + 1);
+ Known = DAG.computeKnownBits(Op.getOperand(0), Depth + 1);
// The operand to BFI is already a mask suitable for removing the bits it
// sets.
More information about the llvm-commits
mailing list