[llvm] PowerPC: Drop AllowFPOpFusion from isProfitableToHoist (PR #221347)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 4 14:12:11 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-powerpc

Author: Matt Arsenault (arsenm)

<details>
<summary>Changes</summary>

Exclusively rely on the contract flags on individual instructions
to enable the removal of AllowFPOpFusion. This had no test coverage
anyway.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply@<!-- -->anthropic.com>

---
Full diff: https://github.com/llvm/llvm-project/pull/221347.diff


1 Files Affected:

- (modified) llvm/lib/Target/PowerPC/PPCISelLowering.cpp (+1-2) 


``````````diff
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index 8152d0350b018..d817688d7a169 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -19641,7 +19641,6 @@ bool PPCTargetLowering::isProfitableToHoist(Instruction *I) const {
         User->getOpcode() != Instruction::FAdd)
       return true;
 
-    const TargetOptions &Options = getTargetMachine().Options;
     const Function *F = I->getFunction();
     const DataLayout &DL = F->getDataLayout();
     Type *Ty = User->getOperand(0)->getType();
@@ -19650,7 +19649,7 @@ bool PPCTargetLowering::isProfitableToHoist(Instruction *I) const {
 
     return !(isFMAFasterThanFMulAndFAdd(*F, Ty) &&
              isOperationLegalOrCustom(ISD::FMA, getValueType(DL, Ty)) &&
-             (AllowContract || Options.AllowFPOpFusion == FPOpFusion::Fast));
+             AllowContract);
   }
   case Instruction::Load: {
     // Don't break "store (load float*)" pattern, this pattern will be combined

``````````

</details>


https://github.com/llvm/llvm-project/pull/221347


More information about the llvm-commits mailing list