llvm.org GIT mirror llvm / 131800e
[NFC][CodeGen] Forgot 2 unary FNeg tests in X86/fma-intrinsics-canonical.ll Follow-up to r362999. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363001 91177308-0d34-0410-b5e6-96231b3b80d8 Cameron McInally 4 months ago
1 changed file(s) with 56 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
809809 ret <4 x float> %3
810810 }
811811
812 define <4 x float> @test_mm_fmaddsub_ps_unary_fneg(<4 x float> %a, <4 x float> %b, <4 x float> %c) {
813 ; CHECK-FMA-LABEL: test_mm_fmaddsub_ps_unary_fneg:
814 ; CHECK-FMA: # %bb.0: # %entry
815 ; CHECK-FMA-NEXT: vfmaddsub213ps %xmm2, %xmm1, %xmm0 # encoding: [0xc4,0xe2,0x71,0xa6,0xc2]
816 ; CHECK-FMA-NEXT: # xmm0 = (xmm1 * xmm0) +/- xmm2
817 ; CHECK-FMA-NEXT: retq # encoding: [0xc3]
818 ;
819 ; CHECK-AVX512VL-LABEL: test_mm_fmaddsub_ps_unary_fneg:
820 ; CHECK-AVX512VL: # %bb.0: # %entry
821 ; CHECK-AVX512VL-NEXT: vfmaddsub213ps %xmm2, %xmm1, %xmm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x71,0xa6,0xc2]
822 ; CHECK-AVX512VL-NEXT: # xmm0 = (xmm1 * xmm0) +/- xmm2
823 ; CHECK-AVX512VL-NEXT: retq # encoding: [0xc3]
824 ;
825 ; CHECK-FMA-WIN-LABEL: test_mm_fmaddsub_ps_unary_fneg:
826 ; CHECK-FMA-WIN: # %bb.0: # %entry
827 ; CHECK-FMA-WIN-NEXT: vmovaps (%rcx), %xmm1 # encoding: [0xc5,0xf8,0x28,0x09]
828 ; CHECK-FMA-WIN-NEXT: vmovaps (%rdx), %xmm0 # encoding: [0xc5,0xf8,0x28,0x02]
829 ; CHECK-FMA-WIN-NEXT: vfmaddsub213ps (%r8), %xmm1, %xmm0 # encoding: [0xc4,0xc2,0x71,0xa6,0x00]
830 ; CHECK-FMA-WIN-NEXT: # xmm0 = (xmm1 * xmm0) +/- mem
831 ; CHECK-FMA-WIN-NEXT: retq # encoding: [0xc3]
832 entry:
833 %0 = tail call <4 x float> @llvm.fma.v4f32(<4 x float> %a, <4 x float> %b, <4 x float> %c) #2
834 %1 = fneg <4 x float> %c
835 %2 = tail call <4 x float> @llvm.fma.v4f32(<4 x float> %a, <4 x float> %b, <4 x float> %1) #2
836 %3 = shufflevector <4 x float> %2, <4 x float> %0, <4 x i32>
837 ret <4 x float> %3
838 }
839
812840 define <2 x double> @test_mm_fmaddsub_pd(<2 x double> %a, <2 x double> %b, <2 x double> %c) {
813841 ; CHECK-FMA-LABEL: test_mm_fmaddsub_pd:
814842 ; CHECK-FMA: # %bb.0: # %entry
832860 entry:
833861 %0 = tail call <2 x double> @llvm.fma.v2f64(<2 x double> %a, <2 x double> %b, <2 x double> %c) #2
834862 %1 = fsub <2 x double> , %c
863 %2 = tail call <2 x double> @llvm.fma.v2f64(<2 x double> %a, <2 x double> %b, <2 x double> %1) #2
864 %3 = shufflevector <2 x double> %2, <2 x double> %0, <2 x i32>
865 ret <2 x double> %3
866 }
867
868 define <2 x double> @test_mm_fmaddsub_pd_unary_fneg(<2 x double> %a, <2 x double> %b, <2 x double> %c) {
869 ; CHECK-FMA-LABEL: test_mm_fmaddsub_pd_unary_fneg:
870 ; CHECK-FMA: # %bb.0: # %entry
871 ; CHECK-FMA-NEXT: vfmaddsub213pd %xmm2, %xmm1, %xmm0 # encoding: [0xc4,0xe2,0xf1,0xa6,0xc2]
872 ; CHECK-FMA-NEXT: # xmm0 = (xmm1 * xmm0) +/- xmm2
873 ; CHECK-FMA-NEXT: retq # encoding: [0xc3]
874 ;
875 ; CHECK-AVX512VL-LABEL: test_mm_fmaddsub_pd_unary_fneg:
876 ; CHECK-AVX512VL: # %bb.0: # %entry
877 ; CHECK-AVX512VL-NEXT: vfmaddsub213pd %xmm2, %xmm1, %xmm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0xf1,0xa6,0xc2]
878 ; CHECK-AVX512VL-NEXT: # xmm0 = (xmm1 * xmm0) +/- xmm2
879 ; CHECK-AVX512VL-NEXT: retq # encoding: [0xc3]
880 ;
881 ; CHECK-FMA-WIN-LABEL: test_mm_fmaddsub_pd_unary_fneg:
882 ; CHECK-FMA-WIN: # %bb.0: # %entry
883 ; CHECK-FMA-WIN-NEXT: vmovapd (%rcx), %xmm1 # encoding: [0xc5,0xf9,0x28,0x09]
884 ; CHECK-FMA-WIN-NEXT: vmovapd (%rdx), %xmm0 # encoding: [0xc5,0xf9,0x28,0x02]
885 ; CHECK-FMA-WIN-NEXT: vfmaddsub213pd (%r8), %xmm1, %xmm0 # encoding: [0xc4,0xc2,0xf1,0xa6,0x00]
886 ; CHECK-FMA-WIN-NEXT: # xmm0 = (xmm1 * xmm0) +/- mem
887 ; CHECK-FMA-WIN-NEXT: retq # encoding: [0xc3]
888 entry:
889 %0 = tail call <2 x double> @llvm.fma.v2f64(<2 x double> %a, <2 x double> %b, <2 x double> %c) #2
890 %1 = fneg <2 x double> %c
835891 %2 = tail call <2 x double> @llvm.fma.v2f64(<2 x double> %a, <2 x double> %b, <2 x double> %1) #2
836892 %3 = shufflevector <2 x double> %2, <2 x double> %0, <2 x i32>
837893 ret <2 x double> %3