[llvm] [AMDGPU] Optimize fsub and fneg when packed fp32 ops are supported (PR #195962)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed May 6 02:55:36 PDT 2026


================
@@ -872,7 +872,7 @@ SITargetLowering::SITargetLowering(const TargetMachine &TM,
     if (Subtarget->hasPackedFP32Ops()) {
       setOperationAction({ISD::FADD, ISD::FMUL, ISD::FMA, ISD::FNEG},
                          MVT::v2f32, Legal);
-      setOperationAction({ISD::FADD, ISD::FMUL, ISD::FMA},
+      setOperationAction({ISD::FADD, ISD::FMUL, ISD::FMA, ISD::FNEG},
----------------
arsenm wrote:

Follow up should also handle fabs 

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


More information about the llvm-commits mailing list