[PATCH] D68949: [DAGCombiner] fold select-of-constants based on sign-bit test

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 14 10:43:43 PDT 2019


spatel marked an inline comment as done.
spatel added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:8208
+  }
+  return SDValue();
+}
----------------
craig.topper wrote:
> What about i8 X > -1 ? 0 : C1  or do we canonicalize that to i8 X < 0 ? C1 : 0?
Instcombine canonicalizes those commuted patterns in IR, but it's not handled in SDAG. Worth duplicating?


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

https://reviews.llvm.org/D68949





More information about the llvm-commits mailing list