[PATCH] D148514: [BranchFolding] Remove redundant conditional branch.

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 17 20:26:02 PDT 2023


goldstein.w.n added inline comments.


================
Comment at: llvm/lib/CodeGen/BranchFolding.cpp:1684
+      if (CurTBB && IsBranchOnlyBlock(MBB) &&
+          AreOperandsIdentical(CurCond, PriorCond) && !MBB->hasAddressTaken() &&
+          !MBB->isEHPad()) {
----------------
Does this take into account comparisons against memory? The pointer (operand) stays the same but value in memory is modified in BB1?


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

https://reviews.llvm.org/D148514



More information about the llvm-commits mailing list