mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
[X86][FMA] Regenerate FMA tests
llvm-svn: 312871
This commit is contained in:
parent
4e212e275d
commit
ef30f9b210
@ -1,3 +1,4 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; RUN: llc < %s -mtriple=x86_64-pc-win32 -mcpu=core-avx2 | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=x86_64-pc-win32 -mattr=+fma | FileCheck %s
|
||||
; RUN: llc < %s -mcpu=bdver2 -mtriple=x86_64-pc-win32 -mattr=-fma4 | FileCheck %s
|
||||
@ -8,8 +9,8 @@ declare <4 x float> @llvm.x86.fma.vfmadd.ss(<4 x float>, <4 x float>, <4 x float
|
||||
define <4 x float> @test_x86_fmadd_baa_ss(<4 x float> %a, <4 x float> %b) #0 {
|
||||
; CHECK-LABEL: test_x86_fmadd_baa_ss:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vmovaps {{\(%rdx\), %xmm0|\(%rcx\), %xmm1}}
|
||||
; CHECK-NEXT: vmovaps {{\(%rdx\), %xmm0|\(%rcx\), %xmm1}}
|
||||
; CHECK-NEXT: vmovaps (%rcx), %xmm1
|
||||
; CHECK-NEXT: vmovaps (%rdx), %xmm0
|
||||
; CHECK-NEXT: vfmadd213ss %xmm1, %xmm1, %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%res = call <4 x float> @llvm.x86.fma.vfmadd.ss(<4 x float> %b, <4 x float> %a, <4 x float> %a) nounwind
|
||||
@ -102,8 +103,8 @@ declare <2 x double> @llvm.x86.fma.vfmadd.sd(<2 x double>, <2 x double>, <2 x do
|
||||
define <2 x double> @test_x86_fmadd_baa_sd(<2 x double> %a, <2 x double> %b) #0 {
|
||||
; CHECK-LABEL: test_x86_fmadd_baa_sd:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vmovapd {{\(%rdx\), %xmm0|\(%rcx\), %xmm1}}
|
||||
; CHECK-NEXT: vmovapd {{\(%rdx\), %xmm0|\(%rcx\), %xmm1}}
|
||||
; CHECK-NEXT: vmovapd (%rcx), %xmm1
|
||||
; CHECK-NEXT: vmovapd (%rdx), %xmm0
|
||||
; CHECK-NEXT: vfmadd213sd %xmm1, %xmm1, %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%res = call <2 x double> @llvm.x86.fma.vfmadd.sd(<2 x double> %b, <2 x double> %a, <2 x double> %a) nounwind
|
||||
@ -197,8 +198,8 @@ declare <4 x float> @llvm.x86.fma.vfnmadd.ss(<4 x float>, <4 x float>, <4 x floa
|
||||
define <4 x float> @test_x86_fnmadd_baa_ss(<4 x float> %a, <4 x float> %b) #0 {
|
||||
; CHECK-LABEL: test_x86_fnmadd_baa_ss:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vmovaps {{\(%rdx\), %xmm0|\(%rcx\), %xmm1}}
|
||||
; CHECK-NEXT: vmovaps {{\(%rdx\), %xmm0|\(%rcx\), %xmm1}}
|
||||
; CHECK-NEXT: vmovaps (%rcx), %xmm1
|
||||
; CHECK-NEXT: vmovaps (%rdx), %xmm0
|
||||
; CHECK-NEXT: vfnmadd213ss %xmm1, %xmm1, %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%res = call <4 x float> @llvm.x86.fma.vfnmadd.ss(<4 x float> %b, <4 x float> %a, <4 x float> %a) nounwind
|
||||
@ -291,8 +292,8 @@ declare <2 x double> @llvm.x86.fma.vfnmadd.sd(<2 x double>, <2 x double>, <2 x d
|
||||
define <2 x double> @test_x86_fnmadd_baa_sd(<2 x double> %a, <2 x double> %b) #0 {
|
||||
; CHECK-LABEL: test_x86_fnmadd_baa_sd:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vmovapd {{\(%rdx\), %xmm0|\(%rcx\), %xmm1}}
|
||||
; CHECK-NEXT: vmovapd {{\(%rdx\), %xmm0|\(%rcx\), %xmm1}}
|
||||
; CHECK-NEXT: vmovapd (%rcx), %xmm1
|
||||
; CHECK-NEXT: vmovapd (%rdx), %xmm0
|
||||
; CHECK-NEXT: vfnmadd213sd %xmm1, %xmm1, %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%res = call <2 x double> @llvm.x86.fma.vfnmadd.sd(<2 x double> %b, <2 x double> %a, <2 x double> %a) nounwind
|
||||
@ -386,8 +387,8 @@ declare <4 x float> @llvm.x86.fma.vfmsub.ss(<4 x float>, <4 x float>, <4 x float
|
||||
define <4 x float> @test_x86_fmsub_baa_ss(<4 x float> %a, <4 x float> %b) #0 {
|
||||
; CHECK-LABEL: test_x86_fmsub_baa_ss:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vmovaps {{\(%rdx\), %xmm0|\(%rcx\), %xmm1}}
|
||||
; CHECK-NEXT: vmovaps {{\(%rdx\), %xmm0|\(%rcx\), %xmm1}}
|
||||
; CHECK-NEXT: vmovaps (%rcx), %xmm1
|
||||
; CHECK-NEXT: vmovaps (%rdx), %xmm0
|
||||
; CHECK-NEXT: vfmsub213ss %xmm1, %xmm1, %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%res = call <4 x float> @llvm.x86.fma.vfmsub.ss(<4 x float> %b, <4 x float> %a, <4 x float> %a) nounwind
|
||||
@ -480,8 +481,8 @@ declare <2 x double> @llvm.x86.fma.vfmsub.sd(<2 x double>, <2 x double>, <2 x do
|
||||
define <2 x double> @test_x86_fmsub_baa_sd(<2 x double> %a, <2 x double> %b) #0 {
|
||||
; CHECK-LABEL: test_x86_fmsub_baa_sd:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vmovapd {{\(%rdx\), %xmm0|\(%rcx\), %xmm1}}
|
||||
; CHECK-NEXT: vmovapd {{\(%rdx\), %xmm0|\(%rcx\), %xmm1}}
|
||||
; CHECK-NEXT: vmovapd (%rcx), %xmm1
|
||||
; CHECK-NEXT: vmovapd (%rdx), %xmm0
|
||||
; CHECK-NEXT: vfmsub213sd %xmm1, %xmm1, %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%res = call <2 x double> @llvm.x86.fma.vfmsub.sd(<2 x double> %b, <2 x double> %a, <2 x double> %a) nounwind
|
||||
@ -575,8 +576,8 @@ declare <4 x float> @llvm.x86.fma.vfnmsub.ss(<4 x float>, <4 x float>, <4 x floa
|
||||
define <4 x float> @test_x86_fnmsub_baa_ss(<4 x float> %a, <4 x float> %b) #0 {
|
||||
; CHECK-LABEL: test_x86_fnmsub_baa_ss:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vmovaps {{\(%rdx\), %xmm0|\(%rcx\), %xmm1}}
|
||||
; CHECK-NEXT: vmovaps {{\(%rdx\), %xmm0|\(%rcx\), %xmm1}}
|
||||
; CHECK-NEXT: vmovaps (%rcx), %xmm1
|
||||
; CHECK-NEXT: vmovaps (%rdx), %xmm0
|
||||
; CHECK-NEXT: vfnmsub213ss %xmm1, %xmm1, %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%res = call <4 x float> @llvm.x86.fma.vfnmsub.ss(<4 x float> %b, <4 x float> %a, <4 x float> %a) nounwind
|
||||
@ -669,8 +670,8 @@ declare <2 x double> @llvm.x86.fma.vfnmsub.sd(<2 x double>, <2 x double>, <2 x d
|
||||
define <2 x double> @test_x86_fnmsub_baa_sd(<2 x double> %a, <2 x double> %b) #0 {
|
||||
; CHECK-LABEL: test_x86_fnmsub_baa_sd:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vmovapd {{\(%rdx\), %xmm0|\(%rcx\), %xmm1}}
|
||||
; CHECK-NEXT: vmovapd {{\(%rdx\), %xmm0|\(%rcx\), %xmm1}}
|
||||
; CHECK-NEXT: vmovapd (%rcx), %xmm1
|
||||
; CHECK-NEXT: vmovapd (%rdx), %xmm0
|
||||
; CHECK-NEXT: vfnmsub213sd %xmm1, %xmm1, %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%res = call <2 x double> @llvm.x86.fma.vfnmsub.sd(<2 x double> %b, <2 x double> %a, <2 x double> %a) nounwind
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,16 +1,23 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=corei7-avx -mattr=+fma4 | FileCheck %s
|
||||
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=bdver2 -mattr=+avx,-fma | FileCheck %s
|
||||
|
||||
; VFMADD
|
||||
define < 4 x float > @test_x86_fma_vfmadd_ss_load(< 4 x float > %a0, < 4 x float > %a1, float* %a2) {
|
||||
; CHECK: vfmaddss (%{{.*}})
|
||||
; CHECK-LABEL: test_x86_fma_vfmadd_ss_load:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vfmaddss (%rdi), %xmm1, %xmm0, %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%x = load float , float *%a2
|
||||
%y = insertelement <4 x float> undef, float %x, i32 0
|
||||
%res = call < 4 x float > @llvm.x86.fma.vfmadd.ss(< 4 x float > %a0, < 4 x float > %a1, < 4 x float > %y)
|
||||
ret < 4 x float > %res
|
||||
}
|
||||
define < 4 x float > @test_x86_fma_vfmadd_ss_load2(< 4 x float > %a0, float* %a1, < 4 x float > %a2) {
|
||||
; CHECK: vfmaddss %{{.*}}, (%{{.*}})
|
||||
; CHECK-LABEL: test_x86_fma_vfmadd_ss_load2:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vfmaddss %xmm1, (%rdi), %xmm0, %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%x = load float , float *%a1
|
||||
%y = insertelement <4 x float> undef, float %x, i32 0
|
||||
%res = call < 4 x float > @llvm.x86.fma.vfmadd.ss(< 4 x float > %a0, < 4 x float > %y, < 4 x float > %a2)
|
||||
@ -20,14 +27,20 @@ define < 4 x float > @test_x86_fma_vfmadd_ss_load2(< 4 x float > %a0, float* %a1
|
||||
declare < 4 x float > @llvm.x86.fma.vfmadd.ss(< 4 x float >, < 4 x float >, < 4 x float >) nounwind readnone
|
||||
|
||||
define < 2 x double > @test_x86_fma_vfmadd_sd_load(< 2 x double > %a0, < 2 x double > %a1, double* %a2) {
|
||||
; CHECK: vfmaddsd (%{{.*}})
|
||||
; CHECK-LABEL: test_x86_fma_vfmadd_sd_load:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vfmaddsd (%rdi), %xmm1, %xmm0, %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%x = load double , double *%a2
|
||||
%y = insertelement <2 x double> undef, double %x, i32 0
|
||||
%res = call < 2 x double > @llvm.x86.fma.vfmadd.sd(< 2 x double > %a0, < 2 x double > %a1, < 2 x double > %y)
|
||||
ret < 2 x double > %res
|
||||
}
|
||||
define < 2 x double > @test_x86_fma_vfmadd_sd_load2(< 2 x double > %a0, double* %a1, < 2 x double > %a2) {
|
||||
; CHECK: vfmaddsd %{{.*}}, (%{{.*}})
|
||||
; CHECK-LABEL: test_x86_fma_vfmadd_sd_load2:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vfmaddsd %xmm1, (%rdi), %xmm0, %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%x = load double , double *%a1
|
||||
%y = insertelement <2 x double> undef, double %x, i32 0
|
||||
%res = call < 2 x double > @llvm.x86.fma.vfmadd.sd(< 2 x double > %a0, < 2 x double > %y, < 2 x double > %a2)
|
||||
@ -35,13 +48,19 @@ define < 2 x double > @test_x86_fma_vfmadd_sd_load2(< 2 x double > %a0, double*
|
||||
}
|
||||
declare < 2 x double > @llvm.x86.fma.vfmadd.sd(< 2 x double >, < 2 x double >, < 2 x double >) nounwind readnone
|
||||
define < 4 x float > @test_x86_fma_vfmadd_ps_load(< 4 x float > %a0, < 4 x float > %a1, < 4 x float >* %a2) {
|
||||
; CHECK: vfmaddps (%{{.*}})
|
||||
; CHECK-LABEL: test_x86_fma_vfmadd_ps_load:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vfmaddps (%rdi), %xmm1, %xmm0, %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%x = load <4 x float>, <4 x float>* %a2
|
||||
%res = call < 4 x float > @llvm.x86.fma.vfmadd.ps(< 4 x float > %a0, < 4 x float > %a1, < 4 x float > %x)
|
||||
ret < 4 x float > %res
|
||||
}
|
||||
define < 4 x float > @test_x86_fma_vfmadd_ps_load2(< 4 x float > %a0, < 4 x float >* %a1, < 4 x float > %a2) {
|
||||
; CHECK: vfmaddps %{{.*}}, (%{{.*}})
|
||||
; CHECK-LABEL: test_x86_fma_vfmadd_ps_load2:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vfmaddps %xmm1, (%rdi), %xmm0, %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%x = load <4 x float>, <4 x float>* %a1
|
||||
%res = call < 4 x float > @llvm.x86.fma.vfmadd.ps(< 4 x float > %a0, < 4 x float > %x, < 4 x float > %a2)
|
||||
ret < 4 x float > %res
|
||||
@ -50,8 +69,11 @@ declare < 4 x float > @llvm.x86.fma.vfmadd.ps(< 4 x float >, < 4 x float >, < 4
|
||||
|
||||
; To test execution dependency
|
||||
define < 4 x float > @test_x86_fma_vfmadd_ps_load3(< 4 x float >* %a0, < 4 x float >* %a1, < 4 x float > %a2) {
|
||||
; CHECK: vmovaps
|
||||
; CHECK: vfmaddps %{{.*}}, (%{{.*}})
|
||||
; CHECK-LABEL: test_x86_fma_vfmadd_ps_load3:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vmovaps (%rdi), %xmm1
|
||||
; CHECK-NEXT: vfmaddps %xmm0, (%rsi), %xmm1, %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%x = load <4 x float>, <4 x float>* %a0
|
||||
%y = load <4 x float>, <4 x float>* %a1
|
||||
%res = call < 4 x float > @llvm.x86.fma.vfmadd.ps(< 4 x float > %x, < 4 x float > %y, < 4 x float > %a2)
|
||||
@ -59,13 +81,19 @@ define < 4 x float > @test_x86_fma_vfmadd_ps_load3(< 4 x float >* %a0, < 4 x flo
|
||||
}
|
||||
|
||||
define < 2 x double > @test_x86_fma_vfmadd_pd_load(< 2 x double > %a0, < 2 x double > %a1, < 2 x double >* %a2) {
|
||||
; CHECK: vfmaddpd (%{{.*}})
|
||||
; CHECK-LABEL: test_x86_fma_vfmadd_pd_load:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vfmaddpd (%rdi), %xmm1, %xmm0, %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%x = load <2 x double>, <2 x double>* %a2
|
||||
%res = call < 2 x double > @llvm.x86.fma.vfmadd.pd(< 2 x double > %a0, < 2 x double > %a1, < 2 x double > %x)
|
||||
ret < 2 x double > %res
|
||||
}
|
||||
define < 2 x double > @test_x86_fma_vfmadd_pd_load2(< 2 x double > %a0, < 2 x double >* %a1, < 2 x double > %a2) {
|
||||
; CHECK: vfmaddpd %{{.*}}, (%{{.*}})
|
||||
; CHECK-LABEL: test_x86_fma_vfmadd_pd_load2:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vfmaddpd %xmm1, (%rdi), %xmm0, %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%x = load <2 x double>, <2 x double>* %a1
|
||||
%res = call < 2 x double > @llvm.x86.fma.vfmadd.pd(< 2 x double > %a0, < 2 x double > %x, < 2 x double > %a2)
|
||||
ret < 2 x double > %res
|
||||
@ -74,8 +102,11 @@ declare < 2 x double > @llvm.x86.fma.vfmadd.pd(< 2 x double >, < 2 x double >, <
|
||||
|
||||
; To test execution dependency
|
||||
define < 2 x double > @test_x86_fma_vfmadd_pd_load3(< 2 x double >* %a0, < 2 x double >* %a1, < 2 x double > %a2) {
|
||||
; CHECK: vmovapd
|
||||
; CHECK: vfmaddpd %{{.*}}, (%{{.*}})
|
||||
; CHECK-LABEL: test_x86_fma_vfmadd_pd_load3:
|
||||
; CHECK: # BB#0:
|
||||
; CHECK-NEXT: vmovapd (%rdi), %xmm1
|
||||
; CHECK-NEXT: vfmaddpd %xmm0, (%rsi), %xmm1, %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%x = load <2 x double>, <2 x double>* %a0
|
||||
%y = load <2 x double>, <2 x double>* %a1
|
||||
%res = call < 2 x double > @llvm.x86.fma.vfmadd.pd(< 2 x double > %x, < 2 x double > %y, < 2 x double > %a2)
|
||||
|
@ -1,3 +1,4 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=+fma | FileCheck -check-prefix=FMA3 -check-prefix=FMA3_256 %s
|
||||
; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=+fma,+avx512f | FileCheck -check-prefix=FMA3 -check-prefix=FMA3_512 %s
|
||||
; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=+fma4 | FileCheck -check-prefix=FMA4 %s
|
||||
|
Loading…
Reference in New Issue
Block a user