[llvm] [X86, SimplifyCFG] Support hoisting load/store with conditional faulting (Part II) (PR #108812)
Shengchen Kan via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 27 08:40:35 PDT 2024
================
@@ -7833,6 +7856,35 @@ bool SimplifyCFGOpt::simplifyCondBranch(BranchInst *BI, IRBuilder<> &Builder) {
if (HoistCommon &&
hoistCommonCodeFromSuccessors(BI, !Options.HoistCommonInsts))
return requestResimplify();
+
+ if (BI && HoistLoadsStoresWithCondFaulting &&
+ Options.HoistLoadsStoresWithCondFaulting &&
+ isProfitableToSpeculate(BI, std::nullopt, TTI)) {
----------------
KanRobert wrote:
Hmm, from you code, it seems the hoist can happen only when TWeight = FWeight = 0. ?
https://github.com/llvm/llvm-project/pull/108812
More information about the llvm-commits
mailing list