File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed
llvm/lib/Transforms/Utils Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -3838,8 +3838,8 @@ void llvm::maybeMarkSanitizerLibraryCallNoBuiltin(
38383838
38393839bool llvm::canReplaceOperandWithVariable (const Instruction *I, unsigned OpIdx) {
38403840 const auto *Op = I->getOperand (OpIdx);
3841- // We can't have a PHI with a metadata type.
3842- if (Op->getType ()->isMetadataTy ())
3841+ // We can't have a PHI with a metadata or token type.
3842+ if (Op->getType ()->isMetadataTy () || Op-> getType ()-> isTokenTy () )
38433843 return false ;
38443844
38453845 // swifterror pointers can only be used by a load, store, or as a swifterror
Original file line number Diff line number Diff line change @@ -2260,10 +2260,6 @@ static bool canSinkInstructions(
22602260
22612261 for (unsigned OI = 0 , OE = I0->getNumOperands (); OI != OE; ++OI) {
22622262 Value *Op = I0->getOperand (OI);
2263- if (Op->getType ()->isTokenTy ())
2264- // Don't touch any operand of token type.
2265- return false ;
2266-
22672263 auto SameAsI0 = [&I0, OI](const Instruction *I) {
22682264 assert (I->getNumOperands () == I0->getNumOperands ());
22692265 return I->getOperand (OI) == I0->getOperand (OI);
@@ -2764,8 +2760,7 @@ bool CompatibleSets::shouldBelongToSameSet(ArrayRef<InvokeInst *> Invokes) {
27642760 Use &U1 = std::get<1 >(Ops);
27652761 if (U0 == U1)
27662762 return false ;
2767- return U0->getType ()->isTokenTy () ||
2768- !canReplaceOperandWithVariable (cast<Instruction>(U0.getUser ()),
2763+ return !canReplaceOperandWithVariable (cast<Instruction>(U0.getUser ()),
27692764 U0.getOperandNo ());
27702765 };
27712766 assert (Invokes.size () == 2 && " Always called with exactly two candidates." );
You can’t perform that action at this time.
0 commit comments