[llvm] [SimplifyCFG] Skip threading if the target may have divergent branches (PR #100185)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 23 23:07:58 PDT 2024
================
@@ -3246,7 +3246,12 @@ bool SimplifyCFGOpt::SpeculativelyExecuteBB(BranchInst *BI,
}
/// Return true if we can thread a branch across this block.
-static bool BlockIsSimpleEnoughToThreadThrough(BasicBlock *BB) {
+static bool BlockIsSimpleEnoughToThreadThrough(BasicBlock *BB,
+ const TargetTransformInfo &TTI) {
+ // Skip threading if the branch may be divergent.
+ if (TTI.hasBranchDivergence(BB->getParent()))
----------------
darkbuck wrote:
> Just another casualty of not being able to update UA! :(
Is it possible to update UA on the demand?
https://github.com/llvm/llvm-project/pull/100185
More information about the llvm-commits
mailing list