[PATCH] D56087: [TargetLowering][AMDGPU] Remove the SimplifyDemandedBits function that takes a User and OpIdx. Stop using it in AMDGPU target for simplifyI24.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 26 14:37:53 PST 2018


RKSimon added a reviewer: tstellar.
RKSimon added a subscriber: tstellar.
RKSimon added a comment.

Adding @tstellar as IIRC he originally added that version of SimplifyDemandedBits



================
Comment at: lib/Target/AMDGPU/AMDGPUISelLowering.cpp:2723
   SelectionDAG &DAG = DCI.DAG;
-  SDValue Op = Node24->getOperand(OpIdx);
-  const TargetLowering &TLI = DAG.getTargetLoweringInfo();
-  EVT VT = Op.getValueType();
+  EVT VT = Node24->getOperand(0).getValueType();
 
----------------
Worth putting this after the LHS/RHS so we don't call getOperand more than necessary?


================
Comment at: lib/Target/AMDGPU/AMDGPUISelLowering.cpp:4325
+      bool RHSNegative = RHSKnown.isNegative();
+      bool RHSPositive = RHSKnown.isNonNegative();
       if ((!LHSNegative && !LHSPositive) || (!RHSNegative && !RHSPositive))
----------------
This looks (mostly) like an NFC? Just commit the bits that you can?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56087/new/

https://reviews.llvm.org/D56087





More information about the llvm-commits mailing list