[PATCH] D97859: [LegalizeDAG] Implement promotion rules for SELECT_CC

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 4 09:09:55 PST 2021


craig.topper added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:4727
+    if (NVT.isInteger()) {
+      ExtOp = isSignedIntSetCC(CCCode) ? ISD::SIGN_EXTEND : ISD::ZERO_EXTEND;
+    }
----------------
If NVT is Integer, but operand 0 and 1 are floating point, I'm not sure we should be calling isSignedIntSetCC. The floating point and integer condition codes are shared. So SETGT, SETLT, SETLE, SETGE are also valid for floating point, but they wouldn't mean anything for determining if you should SIGN_EXTEND or ZERO_EXTEND the true/false values of the SELECT_CC.

But I guess since this hasn't worked properly before now maybe this doesn't happen and it doesn't matter.


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

https://reviews.llvm.org/D97859



More information about the llvm-commits mailing list