99; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512dq,+avx512vl -enable-no-infs-fp-math | FileCheck %s --check-prefixes=AVX512,AVX512-NOINFS
1010
1111;
12- ; Pattern: (fadd contract (fmul contract x, y), z) -> (fmadd x,y,z)
12+ ; Pattern: (fadd (fmul x, y), z) -> (fmadd x,y,z)
1313;
1414
1515define float @test_f32_fmadd (float %a0 , float %a1 , float %a2 ) {
@@ -133,7 +133,7 @@ define <4 x double> @test_4f64_fmadd(<4 x double> %a0, <4 x double> %a1, <4 x do
133133}
134134
135135;
136- ; Pattern: (fsub contract (fmul contract x, y), z) -> (fmsub x, y, z)
136+ ; Pattern: (fsub (fmul x, y), z) -> (fmsub x, y, z)
137137;
138138
139139define float @test_f32_fmsub (float %a0 , float %a1 , float %a2 ) {
@@ -257,7 +257,7 @@ define <4 x double> @test_4f64_fmsub(<4 x double> %a0, <4 x double> %a1, <4 x do
257257}
258258
259259;
260- ; Pattern: (fsub contract z, (fmul contract x, y)) -> (fnmadd x, y, z)
260+ ; Pattern: (fsub z, (fmul x, y)) -> (fnmadd x, y, z)
261261;
262262
263263define float @test_f32_fnmadd (float %a0 , float %a1 , float %a2 ) {
@@ -381,7 +381,7 @@ define <4 x double> @test_4f64_fnmadd(<4 x double> %a0, <4 x double> %a1, <4 x d
381381}
382382
383383;
384- ; Pattern: (fsub contract (fneg (fmul contract x, y)), z) -> (fnmsub x, y, z)
384+ ; Pattern: (fsub (fneg (fmul x, y)), z) -> (fnmsub x, y, z)
385385;
386386
387387define float @test_f32_fnmsub (float %a0 , float %a1 , float %a2 ) {
@@ -1654,7 +1654,7 @@ define <4 x double> @test_v4f64_fneg_fnmsub(<4 x double> %a0, <4 x double> %a1,
16541654}
16551655
16561656;
1657- ; Pattern: (fma x, c1, (fmul contract x, c2)) -> (fmul contract x, c1+c2)
1657+ ; Pattern: (fma x, c1, (fmul x, c2)) -> (fmul x, c1+c2)
16581658;
16591659
16601660define <4 x float > @test_v4f32_fma_x_c1_fmul_x_c2 (<4 x float > %x ) {
@@ -1679,7 +1679,7 @@ define <4 x float> @test_v4f32_fma_x_c1_fmul_x_c2(<4 x float> %x) {
16791679}
16801680
16811681;
1682- ; Pattern: (fma (fmul contract x, c1), c2, y) -> (fma x, c1*c2, y)
1682+ ; Pattern: (fma (fmul x, c1), c2, y) -> (fma x, c1*c2, y)
16831683;
16841684
16851685define <4 x float > @test_v4f32_fma_fmul_x_c1_c2_y (<4 x float > %x , <4 x float > %y ) {
@@ -1703,7 +1703,7 @@ define <4 x float> @test_v4f32_fma_fmul_x_c1_c2_y(<4 x float> %x, <4 x float> %y
17031703 ret <4 x float > %a
17041704}
17051705
1706- ; Pattern: (fneg (fmul contract x, y)) -> (fnmsub x, y, 0)
1706+ ; Pattern: (fneg (fmul x, y)) -> (fnmsub x, y, 0)
17071707
17081708define double @test_f64_fneg_fmul (double %x , double %y ) {
17091709; FMA-LABEL: test_f64_fneg_fmul:
@@ -1824,8 +1824,8 @@ define double @fadd_fma_fmul_1(double %a, double %b, double %c, double %d, doubl
18241824 ret double %a2
18251825}
18261826
1827- ; Minimum FMF - the 1st fadd contract is contracted because that combines
1828- ; fmul contract +fadd contract as specified by the order of operations; the 2nd fadd contract
1827+ ; Minimum FMF - the 1st fadd is contracted because that combines
1828+ ; fmul+fadd as specified by the order of operations; the 2nd fadd
18291829; requires reassociation to fuse with c*d.
18301830
18311831define float @fadd_fma_fmul_fmf (float %a , float %b , float %c , float %d , float %n0 ) nounwind {
@@ -1883,7 +1883,7 @@ define float @fadd_fma_fmul_2(float %a, float %b, float %c, float %d, float %n0)
18831883 ret float %a2
18841884}
18851885
1886- ; The final fadd contract can be folded with either 1 of the leading fmul contracts .
1886+ ; The final fadd can be folded with either 1 of the leading fmuls .
18871887
18881888define <2 x double > @fadd_fma_fmul_3 (<2 x double > %x1 , <2 x double > %x2 , <2 x double > %x3 , <2 x double > %x4 , <2 x double > %x5 , <2 x double > %x6 , <2 x double > %x7 , <2 x double > %x8 ) nounwind {
18891889; FMA-LABEL: fadd_fma_fmul_3:
0 commit comments