[AMDGPU] New test case where we should not form FMA GitOrigin-RevId: 92901996a63b14c3a8605652735acdaf2c20eac9
diff --git a/test/CodeGen/AMDGPU/dagcombine-fma-fmad.ll b/test/CodeGen/AMDGPU/dagcombine-fma-fmad.ll index 485b379..68cc2a1 100644 --- a/test/CodeGen/AMDGPU/dagcombine-fma-fmad.ll +++ b/test/CodeGen/AMDGPU/dagcombine-fma-fmad.ll
@@ -274,6 +274,18 @@ 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