[PATCH] D158609: [LICM][LoopSimplify] Create preheader for callbr (PR64215)
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 23 08:34:36 PDT 2023
nickdesaulniers added inline comments.
================
Comment at: llvm/lib/IR/BasicBlock.cpp:400
// Instructions should not be hoisted across exception handling boundaries.
- return !Term->isExceptionalTerminator();
+ // Also don't hoist across callbr, which produces a value.
+ return !Term->isExceptionalTerminator() && !isa<CallBrInst>(Term);
----------------
Note: a `callbr` may produce a value, but that's optional. It's perhaps more common at the moment that callbr does not produce a value.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158609/new/
https://reviews.llvm.org/D158609
More information about the llvm-commits
mailing list