[PATCH] D43446: [X86] Correct SHRUNKBLEND creation to work correctly when there are multiple uses of the condition.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 20 04:16:00 PST 2018


RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.

LGTM with a couple of minors.



================
Comment at: lib/Target/X86/X86ISelLowering.cpp:31880
+    bool CanShrinkCond = true;
+    for (SDNode::use_iterator UI = Cond->use_begin(), UE = Cond->use_end();
+         UI != UE; ++UI) {
----------------
Can you convert this to a for-range loop using Cond->uses()


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:31898
+        // If we changed the computation somewhere in the DAG, this change will
+        // affect all users of Cond. Uppdate all the nodes so that we do not use
+        // the generic VSELECT anymore. Otherwise, we may perform wrong
----------------
Update


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:31909
         DCI.CommitTargetLoweringOpt(TLO);
-        return SDValue();
+        return SDValue(N, 0);
       }
----------------
I take it there's no reason to re-evaluate this?


Repository:
  rL LLVM

https://reviews.llvm.org/D43446





More information about the llvm-commits mailing list