[PATCH] D71158: [NFC][InstSimplify] Refactoring ThreadCmpOverSelect function

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 9 11:57:33 PST 2019


xbolva00 added inline comments.


================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:147
+  if (SimplifiedCmp == Cond) {
+    // It not only simplified, it simplified to the select condition.
+    SimplifiedCmp = TrueOrFalse;
----------------
It would be great to improve these original comments a bit.


================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:148
+    // It not only simplified, it simplified to the select condition.
+    SimplifiedCmp = TrueOrFalse;
+  } else if (!SimplifiedCmp) {
----------------
return TrueOrFalse;


================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:154
+      return nullptr;
+    SimplifiedCmp = TrueOrFalse;
+  }
----------------
else if (!SimplifiedCmp && isSameCompare(Cond, Pred, LHS, RHS))) {
    return TrueOrFalse;
}


================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:156
+  }
+  return SimplifiedCmp;
+}
----------------
return nullptr;


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71158





More information about the llvm-commits mailing list