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(
3838
3838
3839
3839
bool llvm::canReplaceOperandWithVariable (const Instruction *I, unsigned OpIdx) {
3840
3840
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 () )
3843
3843
return false ;
3844
3844
3845
3845
// 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(
2260
2260
2261
2261
for (unsigned OI = 0 , OE = I0->getNumOperands (); OI != OE; ++OI) {
2262
2262
Value *Op = I0->getOperand (OI);
2263
- if (Op->getType ()->isTokenTy ())
2264
- // Don't touch any operand of token type.
2265
- return false ;
2266
-
2267
2263
auto SameAsI0 = [&I0, OI](const Instruction *I) {
2268
2264
assert (I->getNumOperands () == I0->getNumOperands ());
2269
2265
return I->getOperand (OI) == I0->getOperand (OI);
@@ -2764,8 +2760,7 @@ bool CompatibleSets::shouldBelongToSameSet(ArrayRef<InvokeInst *> Invokes) {
2764
2760
Use &U1 = std::get<1 >(Ops);
2765
2761
if (U0 == U1)
2766
2762
return false ;
2767
- return U0->getType ()->isTokenTy () ||
2768
- !canReplaceOperandWithVariable (cast<Instruction>(U0.getUser ()),
2763
+ return !canReplaceOperandWithVariable (cast<Instruction>(U0.getUser ()),
2769
2764
U0.getOperandNo ());
2770
2765
};
2771
2766
assert (Invokes.size () == 2 && " Always called with exactly two candidates." );
You can’t perform that action at this time.
0 commit comments