[PATCH] D153544: [AMDGPU] Use V_FMA_MIX* more often
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 22 06:28:10 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIInstructions.td:2573
+def : GCNPat<
+ (f16 (fadd (f16 (fpround (f32 (fmul f32:$src0, f32:$src1)))), f16:$src2)),
+ (V_FMA_MIXLO_F16 0, $src0, 0, $src1, 0, $src2, 0, $src0, 0, 0)
----------------
Does this need to consider contract flags? I think the FMA selection question is a bit complicated for a selection pattern. If you have to consider fast math flags I think you're better off moving this to the combiners so the existing mix patterns work
================
Comment at: llvm/lib/Target/AMDGPU/SIInstructions.td:2574
+ (f16 (fadd (f16 (fpround (f32 (fmul f32:$src0, f32:$src1)))), f16:$src2)),
+ (V_FMA_MIXLO_F16 0, $src0, 0, $src1, 0, $src2, 0, $src0, 0, 0)
+>;
----------------
Does the pattern import in globalisel if you add register class annotations to the output operands?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153544/new/
https://reviews.llvm.org/D153544
More information about the llvm-commits
mailing list