2017-09-10 03:25:59 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
2017-09-13 19:21:38 +08:00
|
|
|
; RUN: llc < %s -mtriple=x86_64-pc-win32 -mcpu=core-avx2 | FileCheck %s --check-prefix=FMA
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-pc-win32 -mattr=+fma | FileCheck %s --check-prefix=FMA
|
|
|
|
; RUN: llc < %s -mcpu=bdver2 -mtriple=x86_64-pc-win32 -mattr=-fma4 | FileCheck %s --check-prefix=FMA
|
2015-11-07 03:47:25 +08:00
|
|
|
|
|
|
|
attributes #0 = { nounwind }
|
|
|
|
|
2015-11-13 08:07:35 +08:00
|
|
|
declare <4 x float> @llvm.x86.fma.vfmadd.ss(<4 x float>, <4 x float>, <4 x float>) nounwind readnone
|
|
|
|
define <4 x float> @test_x86_fmadd_baa_ss(<4 x float> %a, <4 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmadd_baa_ss:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rdx), %xmm0
|
2018-07-05 14:52:55 +08:00
|
|
|
; FMA-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
|
|
|
|
; FMA-NEXT: vfmadd213ss {{.*#+}} xmm0 = (xmm1 * xmm0) + xmm1
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-13 08:07:35 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.fma.vfmadd.ss(<4 x float> %b, <4 x float> %a, <4 x float> %a) nounwind
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @test_x86_fmadd_aba_ss(<4 x float> %a, <4 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmadd_aba_ss:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rcx), %xmm0
|
|
|
|
; FMA-NEXT: vfmadd132ss (%rdx), %xmm0, %xmm0
|
|
|
|
; FMA-NEXT: retq
|
2015-11-13 08:07:35 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.fma.vfmadd.ss(<4 x float> %a, <4 x float> %b, <4 x float> %a) nounwind
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @test_x86_fmadd_bba_ss(<4 x float> %a, <4 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmadd_bba_ss:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rdx), %xmm0
|
|
|
|
; FMA-NEXT: vfmadd213ss (%rcx), %xmm0, %xmm0
|
|
|
|
; FMA-NEXT: retq
|
2015-11-13 08:07:35 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.fma.vfmadd.ss(<4 x float> %b, <4 x float> %b, <4 x float> %a) nounwind
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
2015-11-07 03:47:25 +08:00
|
|
|
declare <4 x float> @llvm.x86.fma.vfmadd.ps(<4 x float>, <4 x float>, <4 x float>) nounwind readnone
|
|
|
|
define <4 x float> @test_x86_fmadd_baa_ps(<4 x float> %a, <4 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmadd_baa_ps:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rcx), %xmm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfmadd132ps {{.*#+}} xmm0 = (xmm0 * mem) + xmm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.fma.vfmadd.ps(<4 x float> %b, <4 x float> %a, <4 x float> %a) nounwind
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @test_x86_fmadd_aba_ps(<4 x float> %a, <4 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmadd_aba_ps:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rcx), %xmm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfmadd231ps {{.*#+}} xmm0 = (xmm0 * mem) + xmm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.fma.vfmadd.ps(<4 x float> %a, <4 x float> %b, <4 x float> %a) nounwind
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @test_x86_fmadd_bba_ps(<4 x float> %a, <4 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmadd_bba_ps:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rdx), %xmm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfmadd213ps {{.*#+}} xmm0 = (xmm0 * xmm0) + mem
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.fma.vfmadd.ps(<4 x float> %b, <4 x float> %b, <4 x float> %a) nounwind
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x float> @llvm.x86.fma.vfmadd.ps.256(<8 x float>, <8 x float>, <8 x float>) nounwind readnone
|
|
|
|
define <8 x float> @test_x86_fmadd_baa_ps_y(<8 x float> %a, <8 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmadd_baa_ps_y:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rcx), %ymm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfmadd132ps {{.*#+}} ymm0 = (ymm0 * mem) + ymm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.fma.vfmadd.ps.256(<8 x float> %b, <8 x float> %a, <8 x float> %a) nounwind
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x float> @test_x86_fmadd_aba_ps_y(<8 x float> %a, <8 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmadd_aba_ps_y:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rcx), %ymm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfmadd231ps {{.*#+}} ymm0 = (ymm0 * mem) + ymm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.fma.vfmadd.ps.256(<8 x float> %a, <8 x float> %b, <8 x float> %a) nounwind
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x float> @test_x86_fmadd_bba_ps_y(<8 x float> %a, <8 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmadd_bba_ps_y:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rdx), %ymm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfmadd213ps {{.*#+}} ymm0 = (ymm0 * ymm0) + mem
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.fma.vfmadd.ps.256(<8 x float> %b, <8 x float> %b, <8 x float> %a) nounwind
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
|
2015-11-13 08:07:35 +08:00
|
|
|
declare <2 x double> @llvm.x86.fma.vfmadd.sd(<2 x double>, <2 x double>, <2 x double>) nounwind readnone
|
|
|
|
define <2 x double> @test_x86_fmadd_baa_sd(<2 x double> %a, <2 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmadd_baa_sd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rdx), %xmm0
|
2018-07-05 14:52:55 +08:00
|
|
|
; FMA-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
|
|
|
|
; FMA-NEXT: vfmadd213sd {{.*#+}} xmm0 = (xmm1 * xmm0) + xmm1
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-13 08:07:35 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.fma.vfmadd.sd(<2 x double> %b, <2 x double> %a, <2 x double> %a) nounwind
|
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x double> @test_x86_fmadd_aba_sd(<2 x double> %a, <2 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmadd_aba_sd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rcx), %xmm0
|
|
|
|
; FMA-NEXT: vfmadd132sd (%rdx), %xmm0, %xmm0
|
|
|
|
; FMA-NEXT: retq
|
2015-11-13 08:07:35 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.fma.vfmadd.sd(<2 x double> %a, <2 x double> %b, <2 x double> %a) nounwind
|
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x double> @test_x86_fmadd_bba_sd(<2 x double> %a, <2 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmadd_bba_sd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rdx), %xmm0
|
|
|
|
; FMA-NEXT: vfmadd213sd (%rcx), %xmm0, %xmm0
|
|
|
|
; FMA-NEXT: retq
|
2015-11-13 08:07:35 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.fma.vfmadd.sd(<2 x double> %b, <2 x double> %b, <2 x double> %a) nounwind
|
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
|
|
|
|
2015-11-07 03:47:25 +08:00
|
|
|
declare <2 x double> @llvm.x86.fma.vfmadd.pd(<2 x double>, <2 x double>, <2 x double>) nounwind readnone
|
|
|
|
define <2 x double> @test_x86_fmadd_baa_pd(<2 x double> %a, <2 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmadd_baa_pd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rcx), %xmm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfmadd132pd {{.*#+}} xmm0 = (xmm0 * mem) + xmm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.fma.vfmadd.pd(<2 x double> %b, <2 x double> %a, <2 x double> %a) nounwind
|
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x double> @test_x86_fmadd_aba_pd(<2 x double> %a, <2 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmadd_aba_pd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rcx), %xmm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfmadd231pd {{.*#+}} xmm0 = (xmm0 * mem) + xmm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.fma.vfmadd.pd(<2 x double> %a, <2 x double> %b, <2 x double> %a) nounwind
|
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x double> @test_x86_fmadd_bba_pd(<2 x double> %a, <2 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmadd_bba_pd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rdx), %xmm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfmadd213pd {{.*#+}} xmm0 = (xmm0 * xmm0) + mem
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.fma.vfmadd.pd(<2 x double> %b, <2 x double> %b, <2 x double> %a) nounwind
|
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x double> @llvm.x86.fma.vfmadd.pd.256(<4 x double>, <4 x double>, <4 x double>) nounwind readnone
|
|
|
|
define <4 x double> @test_x86_fmadd_baa_pd_y(<4 x double> %a, <4 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmadd_baa_pd_y:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rcx), %ymm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfmadd132pd {{.*#+}} ymm0 = (ymm0 * mem) + ymm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <4 x double> @llvm.x86.fma.vfmadd.pd.256(<4 x double> %b, <4 x double> %a, <4 x double> %a) nounwind
|
|
|
|
ret <4 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x double> @test_x86_fmadd_aba_pd_y(<4 x double> %a, <4 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmadd_aba_pd_y:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rcx), %ymm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfmadd231pd {{.*#+}} ymm0 = (ymm0 * mem) + ymm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <4 x double> @llvm.x86.fma.vfmadd.pd.256(<4 x double> %a, <4 x double> %b, <4 x double> %a) nounwind
|
|
|
|
ret <4 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x double> @test_x86_fmadd_bba_pd_y(<4 x double> %a, <4 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmadd_bba_pd_y:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rdx), %ymm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfmadd213pd {{.*#+}} ymm0 = (ymm0 * ymm0) + mem
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <4 x double> @llvm.x86.fma.vfmadd.pd.256(<4 x double> %b, <4 x double> %b, <4 x double> %a) nounwind
|
|
|
|
ret <4 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-11-13 08:07:35 +08:00
|
|
|
declare <4 x float> @llvm.x86.fma.vfnmadd.ss(<4 x float>, <4 x float>, <4 x float>) nounwind readnone
|
|
|
|
define <4 x float> @test_x86_fnmadd_baa_ss(<4 x float> %a, <4 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmadd_baa_ss:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rdx), %xmm0
|
2018-07-05 14:52:55 +08:00
|
|
|
; FMA-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
|
|
|
|
; FMA-NEXT: vfnmadd213ss {{.*#+}} xmm0 = -(xmm1 * xmm0) + xmm1
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-13 08:07:35 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.fma.vfnmadd.ss(<4 x float> %b, <4 x float> %a, <4 x float> %a) nounwind
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @test_x86_fnmadd_aba_ss(<4 x float> %a, <4 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmadd_aba_ss:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rcx), %xmm0
|
|
|
|
; FMA-NEXT: vfnmadd132ss (%rdx), %xmm0, %xmm0
|
|
|
|
; FMA-NEXT: retq
|
2015-11-13 08:07:35 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.fma.vfnmadd.ss(<4 x float> %a, <4 x float> %b, <4 x float> %a) nounwind
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @test_x86_fnmadd_bba_ss(<4 x float> %a, <4 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmadd_bba_ss:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rdx), %xmm0
|
|
|
|
; FMA-NEXT: vfnmadd213ss (%rcx), %xmm0, %xmm0
|
|
|
|
; FMA-NEXT: retq
|
2015-11-13 08:07:35 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.fma.vfnmadd.ss(<4 x float> %b, <4 x float> %b, <4 x float> %a) nounwind
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
2015-11-07 03:47:25 +08:00
|
|
|
|
|
|
|
declare <4 x float> @llvm.x86.fma.vfnmadd.ps(<4 x float>, <4 x float>, <4 x float>) nounwind readnone
|
|
|
|
define <4 x float> @test_x86_fnmadd_baa_ps(<4 x float> %a, <4 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmadd_baa_ps:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rcx), %xmm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfnmadd132ps {{.*#+}} xmm0 = -(xmm0 * mem) + xmm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.fma.vfnmadd.ps(<4 x float> %b, <4 x float> %a, <4 x float> %a) nounwind
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @test_x86_fnmadd_aba_ps(<4 x float> %a, <4 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmadd_aba_ps:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rcx), %xmm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfnmadd231ps {{.*#+}} xmm0 = -(xmm0 * mem) + xmm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.fma.vfnmadd.ps(<4 x float> %a, <4 x float> %b, <4 x float> %a) nounwind
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @test_x86_fnmadd_bba_ps(<4 x float> %a, <4 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmadd_bba_ps:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rdx), %xmm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfnmadd213ps {{.*#+}} xmm0 = -(xmm0 * xmm0) + mem
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.fma.vfnmadd.ps(<4 x float> %b, <4 x float> %b, <4 x float> %a) nounwind
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x float> @llvm.x86.fma.vfnmadd.ps.256(<8 x float>, <8 x float>, <8 x float>) nounwind readnone
|
|
|
|
define <8 x float> @test_x86_fnmadd_baa_ps_y(<8 x float> %a, <8 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmadd_baa_ps_y:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rcx), %ymm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfnmadd132ps {{.*#+}} ymm0 = -(ymm0 * mem) + ymm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.fma.vfnmadd.ps.256(<8 x float> %b, <8 x float> %a, <8 x float> %a) nounwind
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x float> @test_x86_fnmadd_aba_ps_y(<8 x float> %a, <8 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmadd_aba_ps_y:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rcx), %ymm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfnmadd231ps {{.*#+}} ymm0 = -(ymm0 * mem) + ymm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.fma.vfnmadd.ps.256(<8 x float> %a, <8 x float> %b, <8 x float> %a) nounwind
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x float> @test_x86_fnmadd_bba_ps_y(<8 x float> %a, <8 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmadd_bba_ps_y:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rdx), %ymm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfnmadd213ps {{.*#+}} ymm0 = -(ymm0 * ymm0) + mem
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.fma.vfnmadd.ps.256(<8 x float> %b, <8 x float> %b, <8 x float> %a) nounwind
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
|
2015-11-13 08:07:35 +08:00
|
|
|
declare <2 x double> @llvm.x86.fma.vfnmadd.sd(<2 x double>, <2 x double>, <2 x double>) nounwind readnone
|
|
|
|
define <2 x double> @test_x86_fnmadd_baa_sd(<2 x double> %a, <2 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmadd_baa_sd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rdx), %xmm0
|
2018-07-05 14:52:55 +08:00
|
|
|
; FMA-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
|
|
|
|
; FMA-NEXT: vfnmadd213sd {{.*#+}} xmm0 = -(xmm1 * xmm0) + xmm1
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-13 08:07:35 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.fma.vfnmadd.sd(<2 x double> %b, <2 x double> %a, <2 x double> %a) nounwind
|
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x double> @test_x86_fnmadd_aba_sd(<2 x double> %a, <2 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmadd_aba_sd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rcx), %xmm0
|
|
|
|
; FMA-NEXT: vfnmadd132sd (%rdx), %xmm0, %xmm0
|
|
|
|
; FMA-NEXT: retq
|
2015-11-13 08:07:35 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.fma.vfnmadd.sd(<2 x double> %a, <2 x double> %b, <2 x double> %a) nounwind
|
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x double> @test_x86_fnmadd_bba_sd(<2 x double> %a, <2 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmadd_bba_sd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rdx), %xmm0
|
|
|
|
; FMA-NEXT: vfnmadd213sd (%rcx), %xmm0, %xmm0
|
|
|
|
; FMA-NEXT: retq
|
2015-11-13 08:07:35 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.fma.vfnmadd.sd(<2 x double> %b, <2 x double> %b, <2 x double> %a) nounwind
|
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
|
|
|
|
2015-11-07 03:47:25 +08:00
|
|
|
declare <2 x double> @llvm.x86.fma.vfnmadd.pd(<2 x double>, <2 x double>, <2 x double>) nounwind readnone
|
|
|
|
define <2 x double> @test_x86_fnmadd_baa_pd(<2 x double> %a, <2 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmadd_baa_pd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rcx), %xmm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfnmadd132pd {{.*#+}} xmm0 = -(xmm0 * mem) + xmm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.fma.vfnmadd.pd(<2 x double> %b, <2 x double> %a, <2 x double> %a) nounwind
|
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x double> @test_x86_fnmadd_aba_pd(<2 x double> %a, <2 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmadd_aba_pd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rcx), %xmm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfnmadd231pd {{.*#+}} xmm0 = -(xmm0 * mem) + xmm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.fma.vfnmadd.pd(<2 x double> %a, <2 x double> %b, <2 x double> %a) nounwind
|
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x double> @test_x86_fnmadd_bba_pd(<2 x double> %a, <2 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmadd_bba_pd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rdx), %xmm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfnmadd213pd {{.*#+}} xmm0 = -(xmm0 * xmm0) + mem
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.fma.vfnmadd.pd(<2 x double> %b, <2 x double> %b, <2 x double> %a) nounwind
|
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x double> @llvm.x86.fma.vfnmadd.pd.256(<4 x double>, <4 x double>, <4 x double>) nounwind readnone
|
|
|
|
define <4 x double> @test_x86_fnmadd_baa_pd_y(<4 x double> %a, <4 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmadd_baa_pd_y:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rcx), %ymm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfnmadd132pd {{.*#+}} ymm0 = -(ymm0 * mem) + ymm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <4 x double> @llvm.x86.fma.vfnmadd.pd.256(<4 x double> %b, <4 x double> %a, <4 x double> %a) nounwind
|
|
|
|
ret <4 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x double> @test_x86_fnmadd_aba_pd_y(<4 x double> %a, <4 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmadd_aba_pd_y:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rcx), %ymm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfnmadd231pd {{.*#+}} ymm0 = -(ymm0 * mem) + ymm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <4 x double> @llvm.x86.fma.vfnmadd.pd.256(<4 x double> %a, <4 x double> %b, <4 x double> %a) nounwind
|
|
|
|
ret <4 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x double> @test_x86_fnmadd_bba_pd_y(<4 x double> %a, <4 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmadd_bba_pd_y:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rdx), %ymm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfnmadd213pd {{.*#+}} ymm0 = -(ymm0 * ymm0) + mem
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <4 x double> @llvm.x86.fma.vfnmadd.pd.256(<4 x double> %b, <4 x double> %b, <4 x double> %a) nounwind
|
|
|
|
ret <4 x double> %res
|
|
|
|
}
|
|
|
|
|
2015-11-13 08:07:35 +08:00
|
|
|
declare <4 x float> @llvm.x86.fma.vfmsub.ss(<4 x float>, <4 x float>, <4 x float>) nounwind readnone
|
|
|
|
define <4 x float> @test_x86_fmsub_baa_ss(<4 x float> %a, <4 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmsub_baa_ss:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rdx), %xmm0
|
2018-07-05 14:52:55 +08:00
|
|
|
; FMA-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
|
|
|
|
; FMA-NEXT: vfmsub213ss {{.*#+}} xmm0 = (xmm1 * xmm0) - xmm1
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-13 08:07:35 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.fma.vfmsub.ss(<4 x float> %b, <4 x float> %a, <4 x float> %a) nounwind
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @test_x86_fmsub_aba_ss(<4 x float> %a, <4 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmsub_aba_ss:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rcx), %xmm0
|
|
|
|
; FMA-NEXT: vfmsub132ss (%rdx), %xmm0, %xmm0
|
|
|
|
; FMA-NEXT: retq
|
2015-11-13 08:07:35 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.fma.vfmsub.ss(<4 x float> %a, <4 x float> %b, <4 x float> %a) nounwind
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @test_x86_fmsub_bba_ss(<4 x float> %a, <4 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmsub_bba_ss:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rdx), %xmm0
|
|
|
|
; FMA-NEXT: vfmsub213ss (%rcx), %xmm0, %xmm0
|
|
|
|
; FMA-NEXT: retq
|
2015-11-13 08:07:35 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.fma.vfmsub.ss(<4 x float> %b, <4 x float> %b, <4 x float> %a) nounwind
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
2015-11-07 03:47:25 +08:00
|
|
|
declare <4 x float> @llvm.x86.fma.vfmsub.ps(<4 x float>, <4 x float>, <4 x float>) nounwind readnone
|
|
|
|
define <4 x float> @test_x86_fmsub_baa_ps(<4 x float> %a, <4 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmsub_baa_ps:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rcx), %xmm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfmsub132ps {{.*#+}} xmm0 = (xmm0 * mem) - xmm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.fma.vfmsub.ps(<4 x float> %b, <4 x float> %a, <4 x float> %a) nounwind
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @test_x86_fmsub_aba_ps(<4 x float> %a, <4 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmsub_aba_ps:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rcx), %xmm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfmsub231ps {{.*#+}} xmm0 = (xmm0 * mem) - xmm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.fma.vfmsub.ps(<4 x float> %a, <4 x float> %b, <4 x float> %a) nounwind
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @test_x86_fmsub_bba_ps(<4 x float> %a, <4 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmsub_bba_ps:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rdx), %xmm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfmsub213ps {{.*#+}} xmm0 = (xmm0 * xmm0) - mem
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.fma.vfmsub.ps(<4 x float> %b, <4 x float> %b, <4 x float> %a) nounwind
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x float> @llvm.x86.fma.vfmsub.ps.256(<8 x float>, <8 x float>, <8 x float>) nounwind readnone
|
|
|
|
define <8 x float> @test_x86_fmsub_baa_ps_y(<8 x float> %a, <8 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmsub_baa_ps_y:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rcx), %ymm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfmsub132ps {{.*#+}} ymm0 = (ymm0 * mem) - ymm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.fma.vfmsub.ps.256(<8 x float> %b, <8 x float> %a, <8 x float> %a) nounwind
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x float> @test_x86_fmsub_aba_ps_y(<8 x float> %a, <8 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmsub_aba_ps_y:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rcx), %ymm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfmsub231ps {{.*#+}} ymm0 = (ymm0 * mem) - ymm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.fma.vfmsub.ps.256(<8 x float> %a, <8 x float> %b, <8 x float> %a) nounwind
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x float> @test_x86_fmsub_bba_ps_y(<8 x float> %a, <8 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmsub_bba_ps_y:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rdx), %ymm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfmsub213ps {{.*#+}} ymm0 = (ymm0 * ymm0) - mem
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.fma.vfmsub.ps.256(<8 x float> %b, <8 x float> %b, <8 x float> %a) nounwind
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
|
2015-11-13 08:07:35 +08:00
|
|
|
declare <2 x double> @llvm.x86.fma.vfmsub.sd(<2 x double>, <2 x double>, <2 x double>) nounwind readnone
|
|
|
|
define <2 x double> @test_x86_fmsub_baa_sd(<2 x double> %a, <2 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmsub_baa_sd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rdx), %xmm0
|
2018-07-05 14:52:55 +08:00
|
|
|
; FMA-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
|
|
|
|
; FMA-NEXT: vfmsub213sd {{.*#+}} xmm0 = (xmm1 * xmm0) - xmm1
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-13 08:07:35 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.fma.vfmsub.sd(<2 x double> %b, <2 x double> %a, <2 x double> %a) nounwind
|
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x double> @test_x86_fmsub_aba_sd(<2 x double> %a, <2 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmsub_aba_sd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rcx), %xmm0
|
|
|
|
; FMA-NEXT: vfmsub132sd (%rdx), %xmm0, %xmm0
|
|
|
|
; FMA-NEXT: retq
|
2015-11-13 08:07:35 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.fma.vfmsub.sd(<2 x double> %a, <2 x double> %b, <2 x double> %a) nounwind
|
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x double> @test_x86_fmsub_bba_sd(<2 x double> %a, <2 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmsub_bba_sd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rdx), %xmm0
|
|
|
|
; FMA-NEXT: vfmsub213sd (%rcx), %xmm0, %xmm0
|
|
|
|
; FMA-NEXT: retq
|
2015-11-13 08:07:35 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.fma.vfmsub.sd(<2 x double> %b, <2 x double> %b, <2 x double> %a) nounwind
|
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
|
|
|
|
2015-11-07 03:47:25 +08:00
|
|
|
declare <2 x double> @llvm.x86.fma.vfmsub.pd(<2 x double>, <2 x double>, <2 x double>) nounwind readnone
|
|
|
|
define <2 x double> @test_x86_fmsub_baa_pd(<2 x double> %a, <2 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmsub_baa_pd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rcx), %xmm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfmsub132pd {{.*#+}} xmm0 = (xmm0 * mem) - xmm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.fma.vfmsub.pd(<2 x double> %b, <2 x double> %a, <2 x double> %a) nounwind
|
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x double> @test_x86_fmsub_aba_pd(<2 x double> %a, <2 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmsub_aba_pd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rcx), %xmm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfmsub231pd {{.*#+}} xmm0 = (xmm0 * mem) - xmm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.fma.vfmsub.pd(<2 x double> %a, <2 x double> %b, <2 x double> %a) nounwind
|
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x double> @test_x86_fmsub_bba_pd(<2 x double> %a, <2 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmsub_bba_pd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rdx), %xmm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfmsub213pd {{.*#+}} xmm0 = (xmm0 * xmm0) - mem
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.fma.vfmsub.pd(<2 x double> %b, <2 x double> %b, <2 x double> %a) nounwind
|
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x double> @llvm.x86.fma.vfmsub.pd.256(<4 x double>, <4 x double>, <4 x double>) nounwind readnone
|
|
|
|
define <4 x double> @test_x86_fmsub_baa_pd_y(<4 x double> %a, <4 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmsub_baa_pd_y:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rcx), %ymm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfmsub132pd {{.*#+}} ymm0 = (ymm0 * mem) - ymm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <4 x double> @llvm.x86.fma.vfmsub.pd.256(<4 x double> %b, <4 x double> %a, <4 x double> %a) nounwind
|
|
|
|
ret <4 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x double> @test_x86_fmsub_aba_pd_y(<4 x double> %a, <4 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmsub_aba_pd_y:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rcx), %ymm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfmsub231pd {{.*#+}} ymm0 = (ymm0 * mem) - ymm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <4 x double> @llvm.x86.fma.vfmsub.pd.256(<4 x double> %a, <4 x double> %b, <4 x double> %a) nounwind
|
|
|
|
ret <4 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x double> @test_x86_fmsub_bba_pd_y(<4 x double> %a, <4 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fmsub_bba_pd_y:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rdx), %ymm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfmsub213pd {{.*#+}} ymm0 = (ymm0 * ymm0) - mem
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <4 x double> @llvm.x86.fma.vfmsub.pd.256(<4 x double> %b, <4 x double> %b, <4 x double> %a) nounwind
|
|
|
|
ret <4 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-11-13 08:07:35 +08:00
|
|
|
declare <4 x float> @llvm.x86.fma.vfnmsub.ss(<4 x float>, <4 x float>, <4 x float>) nounwind readnone
|
|
|
|
define <4 x float> @test_x86_fnmsub_baa_ss(<4 x float> %a, <4 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmsub_baa_ss:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rdx), %xmm0
|
2018-07-05 14:52:55 +08:00
|
|
|
; FMA-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
|
|
|
|
; FMA-NEXT: vfnmsub213ss {{.*#+}} xmm0 = -(xmm1 * xmm0) - xmm1
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-13 08:07:35 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.fma.vfnmsub.ss(<4 x float> %b, <4 x float> %a, <4 x float> %a) nounwind
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @test_x86_fnmsub_aba_ss(<4 x float> %a, <4 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmsub_aba_ss:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rcx), %xmm0
|
|
|
|
; FMA-NEXT: vfnmsub132ss (%rdx), %xmm0, %xmm0
|
|
|
|
; FMA-NEXT: retq
|
2015-11-13 08:07:35 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.fma.vfnmsub.ss(<4 x float> %a, <4 x float> %b, <4 x float> %a) nounwind
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @test_x86_fnmsub_bba_ss(<4 x float> %a, <4 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmsub_bba_ss:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rdx), %xmm0
|
|
|
|
; FMA-NEXT: vfnmsub213ss (%rcx), %xmm0, %xmm0
|
|
|
|
; FMA-NEXT: retq
|
2015-11-13 08:07:35 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.fma.vfnmsub.ss(<4 x float> %b, <4 x float> %b, <4 x float> %a) nounwind
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
2015-11-07 03:47:25 +08:00
|
|
|
declare <4 x float> @llvm.x86.fma.vfnmsub.ps(<4 x float>, <4 x float>, <4 x float>) nounwind readnone
|
|
|
|
define <4 x float> @test_x86_fnmsub_baa_ps(<4 x float> %a, <4 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmsub_baa_ps:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rcx), %xmm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfnmsub132ps {{.*#+}} xmm0 = -(xmm0 * mem) - xmm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.fma.vfnmsub.ps(<4 x float> %b, <4 x float> %a, <4 x float> %a) nounwind
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @test_x86_fnmsub_aba_ps(<4 x float> %a, <4 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmsub_aba_ps:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rcx), %xmm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfnmsub231ps {{.*#+}} xmm0 = -(xmm0 * mem) - xmm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.fma.vfnmsub.ps(<4 x float> %a, <4 x float> %b, <4 x float> %a) nounwind
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x float> @test_x86_fnmsub_bba_ps(<4 x float> %a, <4 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmsub_bba_ps:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rdx), %xmm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfnmsub213ps {{.*#+}} xmm0 = -(xmm0 * xmm0) - mem
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.fma.vfnmsub.ps(<4 x float> %b, <4 x float> %b, <4 x float> %a) nounwind
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x float> @llvm.x86.fma.vfnmsub.ps.256(<8 x float>, <8 x float>, <8 x float>) nounwind readnone
|
|
|
|
define <8 x float> @test_x86_fnmsub_baa_ps_y(<8 x float> %a, <8 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmsub_baa_ps_y:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rcx), %ymm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfnmsub132ps {{.*#+}} ymm0 = -(ymm0 * mem) - ymm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.fma.vfnmsub.ps.256(<8 x float> %b, <8 x float> %a, <8 x float> %a) nounwind
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x float> @test_x86_fnmsub_aba_ps_y(<8 x float> %a, <8 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmsub_aba_ps_y:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rcx), %ymm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfnmsub231ps {{.*#+}} ymm0 = -(ymm0 * mem) - ymm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.fma.vfnmsub.ps.256(<8 x float> %a, <8 x float> %b, <8 x float> %a) nounwind
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x float> @test_x86_fnmsub_bba_ps_y(<8 x float> %a, <8 x float> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmsub_bba_ps_y:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovaps (%rdx), %ymm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfnmsub213ps {{.*#+}} ymm0 = -(ymm0 * ymm0) - mem
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.fma.vfnmsub.ps.256(<8 x float> %b, <8 x float> %b, <8 x float> %a) nounwind
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
|
2015-11-13 08:07:35 +08:00
|
|
|
declare <2 x double> @llvm.x86.fma.vfnmsub.sd(<2 x double>, <2 x double>, <2 x double>) nounwind readnone
|
|
|
|
define <2 x double> @test_x86_fnmsub_baa_sd(<2 x double> %a, <2 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmsub_baa_sd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rdx), %xmm0
|
2018-07-05 14:52:55 +08:00
|
|
|
; FMA-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
|
|
|
|
; FMA-NEXT: vfnmsub213sd {{.*#+}} xmm0 = -(xmm1 * xmm0) - xmm1
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-13 08:07:35 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.fma.vfnmsub.sd(<2 x double> %b, <2 x double> %a, <2 x double> %a) nounwind
|
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x double> @test_x86_fnmsub_aba_sd(<2 x double> %a, <2 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmsub_aba_sd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rcx), %xmm0
|
|
|
|
; FMA-NEXT: vfnmsub132sd (%rdx), %xmm0, %xmm0
|
|
|
|
; FMA-NEXT: retq
|
2015-11-13 08:07:35 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.fma.vfnmsub.sd(<2 x double> %a, <2 x double> %b, <2 x double> %a) nounwind
|
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x double> @test_x86_fnmsub_bba_sd(<2 x double> %a, <2 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmsub_bba_sd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rdx), %xmm0
|
|
|
|
; FMA-NEXT: vfnmsub213sd (%rcx), %xmm0, %xmm0
|
|
|
|
; FMA-NEXT: retq
|
2015-11-13 08:07:35 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.fma.vfnmsub.sd(<2 x double> %b, <2 x double> %b, <2 x double> %a) nounwind
|
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
|
|
|
|
2015-11-07 03:47:25 +08:00
|
|
|
declare <2 x double> @llvm.x86.fma.vfnmsub.pd(<2 x double>, <2 x double>, <2 x double>) nounwind readnone
|
|
|
|
define <2 x double> @test_x86_fnmsub_baa_pd(<2 x double> %a, <2 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmsub_baa_pd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rcx), %xmm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfnmsub132pd {{.*#+}} xmm0 = -(xmm0 * mem) - xmm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.fma.vfnmsub.pd(<2 x double> %b, <2 x double> %a, <2 x double> %a) nounwind
|
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x double> @test_x86_fnmsub_aba_pd(<2 x double> %a, <2 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmsub_aba_pd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rcx), %xmm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfnmsub231pd {{.*#+}} xmm0 = -(xmm0 * mem) - xmm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.fma.vfnmsub.pd(<2 x double> %a, <2 x double> %b, <2 x double> %a) nounwind
|
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x double> @test_x86_fnmsub_bba_pd(<2 x double> %a, <2 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmsub_bba_pd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rdx), %xmm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfnmsub213pd {{.*#+}} xmm0 = -(xmm0 * xmm0) - mem
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.fma.vfnmsub.pd(<2 x double> %b, <2 x double> %b, <2 x double> %a) nounwind
|
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <4 x double> @llvm.x86.fma.vfnmsub.pd.256(<4 x double>, <4 x double>, <4 x double>) nounwind readnone
|
|
|
|
define <4 x double> @test_x86_fnmsub_baa_pd_y(<4 x double> %a, <4 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmsub_baa_pd_y:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rcx), %ymm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfnmsub132pd {{.*#+}} ymm0 = -(ymm0 * mem) - ymm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <4 x double> @llvm.x86.fma.vfnmsub.pd.256(<4 x double> %b, <4 x double> %a, <4 x double> %a) nounwind
|
|
|
|
ret <4 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x double> @test_x86_fnmsub_aba_pd_y(<4 x double> %a, <4 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmsub_aba_pd_y:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rcx), %ymm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfnmsub231pd {{.*#+}} ymm0 = -(ymm0 * mem) - ymm0
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <4 x double> @llvm.x86.fma.vfnmsub.pd.256(<4 x double> %a, <4 x double> %b, <4 x double> %a) nounwind
|
|
|
|
ret <4 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x double> @test_x86_fnmsub_bba_pd_y(<4 x double> %a, <4 x double> %b) #0 {
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-LABEL: test_x86_fnmsub_bba_pd_y:
|
2017-12-05 01:18:51 +08:00
|
|
|
; FMA: # %bb.0:
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: vmovapd (%rdx), %ymm0
|
2018-03-11 05:30:46 +08:00
|
|
|
; FMA-NEXT: vfnmsub213pd {{.*#+}} ymm0 = -(ymm0 * ymm0) - mem
|
2017-09-13 19:21:38 +08:00
|
|
|
; FMA-NEXT: retq
|
2015-11-07 03:47:25 +08:00
|
|
|
%res = call <4 x double> @llvm.x86.fma.vfnmsub.pd.256(<4 x double> %b, <4 x double> %b, <4 x double> %a) nounwind
|
|
|
|
ret <4 x double> %res
|
|
|
|
}
|
|
|
|
|