mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-18 14:20:25 +00:00
[TRE] Add assertion for folding trivial return block
llvm-svn: 305637
This commit is contained in:
parent
d5b4d0b53a
commit
025780ba6e
@ -677,6 +677,10 @@ static bool foldReturnAndProcessPred(BasicBlock *BB, ReturnInst *Ret,
|
||||
const TargetTransformInfo *TTI) {
|
||||
bool Change = false;
|
||||
|
||||
// Make sure this block is a trivial return block.
|
||||
assert(BB->getFirstNonPHIOrDbg() == Ret &&
|
||||
"Trying to fold non-trivial return block");
|
||||
|
||||
// If the return block contains nothing but the return and PHI's,
|
||||
// there might be an opportunity to duplicate the return in its
|
||||
// predecessors and perform TRE there. Look for predecessors that end
|
||||
|
Loading…
x
Reference in New Issue
Block a user