[PATCH] D124618: [SelectionDAG] Use correct boolean representation in FoldConstantArithmetic

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 28 08:23:17 PDT 2022


bjope added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:5646
+    if (LegalSVT != SVT) {
+      if (NeedToExtendBackAccordingToBooleanContentRules) {
+        ISD::NodeType ExtendCode =
----------------
Not sure if it perhaps would be OK (or even more correct) to always extend according to getBooleanContents here if ScalarResult:s type is i1?

(when preparing this patch it felt less intrusive to just consider the case when SVT has been adjusted down for a SETCC above)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124618



More information about the llvm-commits mailing list