@@ -549,7 +549,7 @@ define <vscale x 8 x half> @fnmla_h_reversed(<vscale x 8 x half> %acc, <vscale x
549
549
; CHECK-NEXT: ret
550
550
%mul = fmul contract <vscale x 8 x half > %m1 , %m2
551
551
%add = fadd contract <vscale x 8 x half > %mul , %acc
552
- %res = fneg contract <vscale x 8 x half > %add
552
+ %res = fneg contract nsz <vscale x 8 x half > %add
553
553
ret <vscale x 8 x half > %res
554
554
}
555
555
@@ -561,7 +561,7 @@ define <vscale x 4 x half> @fnmla_hx4_reversed(<vscale x 4 x half> %acc, <vscale
561
561
; CHECK-NEXT: ret
562
562
%mul = fmul contract <vscale x 4 x half > %m1 , %m2
563
563
%add = fadd contract <vscale x 4 x half > %mul , %acc
564
- %res = fneg contract <vscale x 4 x half > %add
564
+ %res = fneg contract nsz <vscale x 4 x half > %add
565
565
ret <vscale x 4 x half > %res
566
566
}
567
567
@@ -573,7 +573,7 @@ define <vscale x 2 x half> @fnmla_hx2_reversed(<vscale x 2 x half> %acc, <vscale
573
573
; CHECK-NEXT: ret
574
574
%mul = fmul contract <vscale x 2 x half > %m1 , %m2
575
575
%add = fadd contract <vscale x 2 x half > %mul , %acc
576
- %res = fneg contract <vscale x 2 x half > %add
576
+ %res = fneg contract nsz <vscale x 2 x half > %add
577
577
ret <vscale x 2 x half > %res
578
578
}
579
579
@@ -585,7 +585,7 @@ define <vscale x 4 x float> @fnmla_s_reversed(<vscale x 4 x float> %acc, <vscale
585
585
; CHECK-NEXT: ret
586
586
%mul = fmul contract <vscale x 4 x float > %m1 , %m2
587
587
%add = fadd contract <vscale x 4 x float > %mul , %acc
588
- %res = fneg contract <vscale x 4 x float > %add
588
+ %res = fneg contract nsz <vscale x 4 x float > %add
589
589
ret <vscale x 4 x float > %res
590
590
}
591
591
@@ -597,7 +597,7 @@ define <vscale x 2 x float> @fnmla_sx2_reversed(<vscale x 2 x float> %acc, <vsca
597
597
; CHECK-NEXT: ret
598
598
%mul = fmul contract <vscale x 2 x float > %m1 , %m2
599
599
%add = fadd contract <vscale x 2 x float > %mul , %acc
600
- %res = fneg contract <vscale x 2 x float > %add
600
+ %res = fneg contract nsz <vscale x 2 x float > %add
601
601
ret <vscale x 2 x float > %res
602
602
}
603
603
@@ -606,6 +606,84 @@ define <vscale x 2 x double> @fnmla_d_reversed(<vscale x 2 x double> %acc, <vsca
606
606
; CHECK: // %bb.0:
607
607
; CHECK-NEXT: ptrue p0.d
608
608
; CHECK-NEXT: fnmla z0.d, p0/m, z1.d, z2.d
609
+ ; CHECK-NEXT: ret
610
+ %mul = fmul contract <vscale x 2 x double > %m1 , %m2
611
+ %add = fadd contract <vscale x 2 x double > %mul , %acc
612
+ %res = fneg contract nsz <vscale x 2 x double > %add
613
+ ret <vscale x 2 x double > %res
614
+ }
615
+
616
+ define <vscale x 8 x half > @signed_zeros_negtest_fnmla_h_reversed (<vscale x 8 x half > %acc , <vscale x 8 x half > %m1 , <vscale x 8 x half > %m2 ) {
617
+ ; CHECK-LABEL: signed_zeros_negtest_fnmla_h_reversed:
618
+ ; CHECK: // %bb.0:
619
+ ; CHECK-NEXT: ptrue p0.h
620
+ ; CHECK-NEXT: fmla z0.h, p0/m, z1.h, z2.h
621
+ ; CHECK-NEXT: fneg z0.h, p0/m, z0.h
622
+ ; CHECK-NEXT: ret
623
+ %mul = fmul contract <vscale x 8 x half > %m1 , %m2
624
+ %add = fadd contract <vscale x 8 x half > %mul , %acc
625
+ %res = fneg contract <vscale x 8 x half > %add
626
+ ret <vscale x 8 x half > %res
627
+ }
628
+
629
+ define <vscale x 4 x half > @signed_zeros_negtest_fnmla_hx4_reversed (<vscale x 4 x half > %acc , <vscale x 4 x half > %m1 , <vscale x 4 x half > %m2 ) {
630
+ ; CHECK-LABEL: signed_zeros_negtest_fnmla_hx4_reversed:
631
+ ; CHECK: // %bb.0:
632
+ ; CHECK-NEXT: ptrue p0.s
633
+ ; CHECK-NEXT: fmla z0.h, p0/m, z1.h, z2.h
634
+ ; CHECK-NEXT: fneg z0.h, p0/m, z0.h
635
+ ; CHECK-NEXT: ret
636
+ %mul = fmul contract <vscale x 4 x half > %m1 , %m2
637
+ %add = fadd contract <vscale x 4 x half > %mul , %acc
638
+ %res = fneg contract <vscale x 4 x half > %add
639
+ ret <vscale x 4 x half > %res
640
+ }
641
+
642
+ define <vscale x 2 x half > @signed_zeros_negtest_fnmla_hx2_reversed (<vscale x 2 x half > %acc , <vscale x 2 x half > %m1 , <vscale x 2 x half > %m2 ) {
643
+ ; CHECK-LABEL: signed_zeros_negtest_fnmla_hx2_reversed:
644
+ ; CHECK: // %bb.0:
645
+ ; CHECK-NEXT: ptrue p0.d
646
+ ; CHECK-NEXT: fmla z0.h, p0/m, z1.h, z2.h
647
+ ; CHECK-NEXT: fneg z0.h, p0/m, z0.h
648
+ ; CHECK-NEXT: ret
649
+ %mul = fmul contract <vscale x 2 x half > %m1 , %m2
650
+ %add = fadd contract <vscale x 2 x half > %mul , %acc
651
+ %res = fneg contract <vscale x 2 x half > %add
652
+ ret <vscale x 2 x half > %res
653
+ }
654
+
655
+ define <vscale x 4 x float > @signed_zeros_negtest_fnmla_s_reversed (<vscale x 4 x float > %acc , <vscale x 4 x float > %m1 , <vscale x 4 x float > %m2 ) {
656
+ ; CHECK-LABEL: signed_zeros_negtest_fnmla_s_reversed:
657
+ ; CHECK: // %bb.0:
658
+ ; CHECK-NEXT: ptrue p0.s
659
+ ; CHECK-NEXT: fmla z0.s, p0/m, z1.s, z2.s
660
+ ; CHECK-NEXT: fneg z0.s, p0/m, z0.s
661
+ ; CHECK-NEXT: ret
662
+ %mul = fmul contract <vscale x 4 x float > %m1 , %m2
663
+ %add = fadd contract <vscale x 4 x float > %mul , %acc
664
+ %res = fneg contract <vscale x 4 x float > %add
665
+ ret <vscale x 4 x float > %res
666
+ }
667
+
668
+ define <vscale x 2 x float > @signed_zeros_negtest_fnmla_sx2_reversed (<vscale x 2 x float > %acc , <vscale x 2 x float > %m1 , <vscale x 2 x float > %m2 ) {
669
+ ; CHECK-LABEL: signed_zeros_negtest_fnmla_sx2_reversed:
670
+ ; CHECK: // %bb.0:
671
+ ; CHECK-NEXT: ptrue p0.d
672
+ ; CHECK-NEXT: fmla z0.s, p0/m, z1.s, z2.s
673
+ ; CHECK-NEXT: fneg z0.s, p0/m, z0.s
674
+ ; CHECK-NEXT: ret
675
+ %mul = fmul contract <vscale x 2 x float > %m1 , %m2
676
+ %add = fadd contract <vscale x 2 x float > %mul , %acc
677
+ %res = fneg contract <vscale x 2 x float > %add
678
+ ret <vscale x 2 x float > %res
679
+ }
680
+
681
+ define <vscale x 2 x double > @signed_zeros_negtest_fnmla_d_reversed (<vscale x 2 x double > %acc , <vscale x 2 x double > %m1 , <vscale x 2 x double > %m2 ) {
682
+ ; CHECK-LABEL: signed_zeros_negtest_fnmla_d_reversed:
683
+ ; CHECK: // %bb.0:
684
+ ; CHECK-NEXT: ptrue p0.d
685
+ ; CHECK-NEXT: fmla z0.d, p0/m, z1.d, z2.d
686
+ ; CHECK-NEXT: fneg z0.d, p0/m, z0.d
609
687
; CHECK-NEXT: ret
610
688
%mul = fmul contract <vscale x 2 x double > %m1 , %m2
611
689
%add = fadd contract <vscale x 2 x double > %mul , %acc
0 commit comments