[PATCH] D95026: [SimplifyCFG] Update FoldBranchToCommonDest to be poison-safe
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 25 02:44:04 PST 2021
aqjune 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())))
----------------
lebedev.ri wrote:
> This needs changing, too
The created selects are semantically equivalent to and/or - but would it be more correct to count them as having select costs? (I'm not familiar with the instruction cost things)
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