[PATCH] D145065: [DAG] expandIntMINMAX - attempt to match existing SETCC node

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 1 09:04:57 PST 2023


RKSimon added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:9542
+    }
+    for (ISD::CondCode CC : {PrefCommuteCC, AltCommuteCC}) {
+      if (DAG.doesNodeExist(ISD::SETCC, BoolVTList,
----------------
goldstein.w.n wrote:
> Maybe there should be a TLI flag to do `PrefCommuteCC` before `AltCC`?
I think that's where we're heading towards - x86 might be the most limited of ISAs for icmp (vectors anyway), and SETCC reuse seems to be an important part of this, but always choosing the target's simplest CondCode is vital as well.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145065



More information about the llvm-commits mailing list