[PATCH] D103280: [SDAG] try harder to fold casts into vector compare

Pengfei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 27 20:55:22 PDT 2021


pengfei added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:10946-10947
+          TLI.isOperationLegalOrCustom(ISD::SETCC, VT) &&
+          !TLI.isOperationLegalOrCustom(ISD::SETCC, SVT)) {
+        // We have an unsupported narrow vector compare op that would be legal
+        // if extended to the destination type. See if the compare operands
----------------
lebedev.ri wrote:
> `SVT` is the result type of comparison of values with `N00VT` type.
> Shouldn't this be `!TLI.isOperationLegalOrCustom(ISD::SETCC, N00VT)` ?
I think this is used for preventing the legal cases of the result type of comparison, e.g. cmp_slt_load_const?


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

https://reviews.llvm.org/D103280



More information about the llvm-commits mailing list