@@ -546,10 +546,10 @@ Value *PredicateInfoBuilder::materializeStack(unsigned int &Counter,
546
546
? OrigOp
547
547
: (RenameStack.end () - Start - 1 )->Def ;
548
548
// For edge predicates, we can just place the operand in the block before
549
- // the terminator. For assume, we have to place it right before the assume
550
- // to ensure we dominate all of our uses. Always insert right before the
551
- // relevant instruction ( terminator, assume) , so that we insert in proper
552
- // order in the case of multiple predicateinfo in the same block.
549
+ // the terminator. For assume, we have to place it right after the assume
550
+ // to ensure we dominate all uses except assume itself. Always insert
551
+ // right before the terminator or after the assume, so that we insert in
552
+ // proper order in the case of multiple predicateinfo in the same block.
553
553
// The number of named values is used to detect if a new declaration was
554
554
// added. If so, that declaration is tracked so that it can be removed when
555
555
// the analysis is done. The corner case were a new declaration results in
@@ -622,7 +622,7 @@ void PredicateInfoBuilder::renameUses(SmallVectorImpl<Value *> &OpsToRename) {
622
622
// The predicate info for branches always come first, they will get
623
623
// materialized in the split block at the top of the block.
624
624
// The predicate info for assumes will be somewhere in the middle,
625
- // it will get materialized in front of the assume.
625
+ // it will get materialized right after the assume.
626
626
if (const auto *PAssume = dyn_cast<PredicateAssume>(PossibleCopy)) {
627
627
VD.LocalNum = LN_Middle;
628
628
DomTreeNode *DomNode = DT.getNode (PAssume->AssumeInst ->getParent ());
0 commit comments