[PATCH] D56406: Remove check for single use in ShrinkDemandedConstant

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 8 18:28:19 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL350684: Remove check for single use in ShrinkDemandedConstant (authored by rampitec, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D56406?vs=180689&id=180778#toc

Repository:
  rL LLVM

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

https://reviews.llvm.org/D56406

Files:
  llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  llvm/trunk/lib/Target/AMDGPU/SIISelLowering.cpp


Index: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -350,9 +350,6 @@
   SDLoc DL(Op);
   unsigned Opcode = Op.getOpcode();
 
-  if (!Op.hasOneUse())
-    return false;
-
   // Do target-specific constant optimization.
   if (targetShrinkDemandedConstant(Op, Demanded, TLO))
     return TLO.New.getNode();
Index: llvm/trunk/lib/Target/AMDGPU/SIISelLowering.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIISelLowering.cpp
+++ llvm/trunk/lib/Target/AMDGPU/SIISelLowering.cpp
@@ -8586,8 +8586,7 @@
   TargetLowering::TargetLoweringOpt TLO(DAG, !DCI.isBeforeLegalize(),
                                         !DCI.isBeforeLegalizeOps());
   const TargetLowering &TLI = DAG.getTargetLoweringInfo();
-  if (TLI.ShrinkDemandedConstant(Src, Demanded, TLO) ||
-      TLI.SimplifyDemandedBits(Src, Demanded, Known, TLO)) {
+  if (TLI.SimplifyDemandedBits(Src, Demanded, Known, TLO)) {
     DCI.CommitTargetLoweringOpt(TLO);
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56406.180778.patch
Type: text/x-patch
Size: 1181 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190109/6c7f76ea/attachment.bin>


More information about the llvm-commits mailing list