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

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 24 23:33:29 PST 2021


lebedev.ri added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:2982-2993
     // Check the cost of inserting the necessary logic before performing the
     // transformation.
     if (TTI && Opc != Instruction::BinaryOpsEnd) {
       Type *Ty = BI->getCondition()->getType();
       unsigned Cost = TTI->getArithmeticInstrCost(Opc, Ty, CostKind);
       if (InvertPredCond && (!PBI->getCondition()->hasOneUse() ||
           !isa<CmpInst>(PBI->getCondition())))
----------------
This needs changing, too


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