[PATCH] D108837: [SimplifyCFG] Ignore free instructions when computing cost for folding branch to common dest
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 16 11:45:18 PDT 2021
aeubanks added a comment.
Seems to be in the code added recently in https://reviews.llvm.org/rG909cba969981032c5740774ca84a34b7f76b909b
with
diff --cc llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index ac386761e12b,ac386761e12b..32bba11659e7
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@@ -1107,6 -1107,6 +1107,9 @@@ static void CloneInstructionsIntoPredec
auto *UI = cast<Instruction>(U.getUser());
auto *PN = dyn_cast<PHINode>(UI);
if (!PN) {
++ BonusInst.dump();
++ UI->dump();
++ errs() << (UI->getParent() == BB) << " " << BonusInst.comesBefore(UI) << "\n";
assert(UI->getParent() == BB && BonusInst.comesBefore(UI) &&
"If the user is not a PHI node, then it should be in the same "
"block as, and come after, the original bonus instruction.");
I'm seeing
%.old = bitcast [1 x i64]* undef to i8*
call void @llvm.lifetime.start.p0i8(i64 8, i8* %.old)
0 opt: ../../llvm/lib/IR/Instruction.cpp:114: bool llvm::Instruction::comesBefore(const llvm::Instruction *) const: Assertion `Parent == Other->Parent && "cross-BB instruction order comparison"' failed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108837/new/
https://reviews.llvm.org/D108837
More information about the llvm-commits
mailing list