[llvm] 9290199 - [AMDGPU] New test case where we should not form FMA
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 1 07:13:17 PDT 2023
Author: Jay Foad
Date: 2023-06-01T15:10:50+01:00
New Revision: 92901996a63b14c3a8605652735acdaf2c20eac9
URL: https://github.com/llvm/llvm-project/commit/92901996a63b14c3a8605652735acdaf2c20eac9
DIFF: https://github.com/llvm/llvm-project/commit/92901996a63b14c3a8605652735acdaf2c20eac9.diff
LOG: [AMDGPU] New test case where we should not form FMA
Added:
Modified:
llvm/test/CodeGen/AMDGPU/dagcombine-fma-fmad.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/AMDGPU/dagcombine-fma-fmad.ll b/llvm/test/CodeGen/AMDGPU/dagcombine-fma-fmad.ll
index 485b3790a9cb..68cc2a168115 100644
--- a/llvm/test/CodeGen/AMDGPU/dagcombine-fma-fmad.ll
+++ b/llvm/test/CodeGen/AMDGPU/dagcombine-fma-fmad.ll
@@ -274,6 +274,18 @@ define amdgpu_ps float @fma_vs_output_modifier(float %x, i32 %n) #0 {
ret float %r
}
+define amdgpu_ps float @fma_vs_output_modifier_2(float %x) #0 {
+; GCN-LABEL: fma_vs_output_modifier_2:
+; GCN: ; %bb.0:
+; GCN-NEXT: v_mul_f32_e32 v1, v0, v0
+; GCN-NEXT: v_fmac_f32_e32 v1, v0, v0
+; GCN-NEXT: v_mov_b32_e32 v0, v1
+; GCN-NEXT: ; return to shader part epilog
+ %m = fmul contract float %x, %x
+ %a = fadd nsz contract float %m, %m
+ ret float %a
+}
+
; Function Attrs: nofree nosync nounwind readnone speculatable willreturn
declare float @llvm.maxnum.f32(float, float) #1
More information about the llvm-commits
mailing list