[PATCH] D95026: [SimplifyCFG] Update FoldBranchToCommonDest to be poison-safe

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 7 06:51:05 PST 2021


nikic accepted this revision.
nikic added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:2965
+  if (PoisonSafe)
+    UseBinOp = impliesPoison(BICond, PBI->getCondition());
+
----------------
I would write this as `bool UseBinOp = !PoisonSafe || impliesPoison(BICond, PBI->getCondition());` rather than a separate if. Or inline the condition entirely.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95026



More information about the llvm-commits mailing list