2011-11-30 23:09:42 +01:00
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -march=x86-64 -mattr=+avx,+fma4 | FileCheck %s
|
2012-08-27 08:59:01 +02:00
|
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=bdver2 -mattr=+avx,-fma | FileCheck %s
|
2011-11-30 23:09:42 +01:00
|
|
|
|
|
|
|
; VFMADD
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 4 x float > @test_x86_fma_vfmadd_ss(< 4 x float > %a0, < 4 x float > %a1, < 4 x float > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfmaddss
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 4 x float > @llvm.x86.fma.vfmadd.ss(< 4 x float > %a0, < 4 x float > %a1, < 4 x float > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 4 x float > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 4 x float > @test_x86_fma_vfmadd_ss_load(< 4 x float > %a0, < 4 x float > %a1, float* %a2) {
|
2011-12-30 02:49:53 +01:00
|
|
|
; CHECK: vfmaddss (%{{.*}})
|
|
|
|
%x = load float *%a2
|
|
|
|
%y = insertelement <4 x float> undef, float %x, i32 0
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 4 x float > @llvm.x86.fma.vfmadd.ss(< 4 x float > %a0, < 4 x float > %a1, < 4 x float > %y) ; <i64> [#uses=1]
|
2011-12-30 02:49:53 +01:00
|
|
|
ret < 4 x float > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 4 x float > @test_x86_fma_vfmadd_ss_load2(< 4 x float > %a0, float* %a1, < 4 x float > %a2) {
|
2011-12-30 02:49:53 +01:00
|
|
|
; CHECK: vfmaddss %{{.*}}, (%{{.*}})
|
|
|
|
%x = load float *%a1
|
|
|
|
%y = insertelement <4 x float> undef, float %x, i32 0
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 4 x float > @llvm.x86.fma.vfmadd.ss(< 4 x float > %a0, < 4 x float > %y, < 4 x float > %a2) ; <i64> [#uses=1]
|
2011-12-30 02:49:53 +01:00
|
|
|
ret < 4 x float > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 4 x float > @llvm.x86.fma.vfmadd.ss(< 4 x float >, < 4 x float >, < 4 x float >) nounwind readnone
|
2011-11-25 20:33:42 +01:00
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 2 x double > @test_x86_fma_vfmadd_sd(< 2 x double > %a0, < 2 x double > %a1, < 2 x double > %a2) {
|
2011-11-25 20:33:42 +01:00
|
|
|
; CHECK: vfmaddsd
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 2 x double > @llvm.x86.fma.vfmadd.sd(< 2 x double > %a0, < 2 x double > %a1, < 2 x double > %a2) ; <i64> [#uses=1]
|
2011-11-25 20:33:42 +01:00
|
|
|
ret < 2 x double > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 2 x double > @test_x86_fma_vfmadd_sd_load(< 2 x double > %a0, < 2 x double > %a1, double* %a2) {
|
2011-12-30 02:49:53 +01:00
|
|
|
; CHECK: vfmaddsd (%{{.*}})
|
|
|
|
%x = load double *%a2
|
|
|
|
%y = insertelement <2 x double> undef, double %x, i32 0
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 2 x double > @llvm.x86.fma.vfmadd.sd(< 2 x double > %a0, < 2 x double > %a1, < 2 x double > %y) ; <i64> [#uses=1]
|
2011-12-30 02:49:53 +01:00
|
|
|
ret < 2 x double > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 2 x double > @test_x86_fma_vfmadd_sd_load2(< 2 x double > %a0, double* %a1, < 2 x double > %a2) {
|
2011-12-30 02:49:53 +01:00
|
|
|
; CHECK: vfmaddsd %{{.*}}, (%{{.*}})
|
|
|
|
%x = load double *%a1
|
|
|
|
%y = insertelement <2 x double> undef, double %x, i32 0
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 2 x double > @llvm.x86.fma.vfmadd.sd(< 2 x double > %a0, < 2 x double > %y, < 2 x double > %a2) ; <i64> [#uses=1]
|
2011-12-30 02:49:53 +01:00
|
|
|
ret < 2 x double > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 2 x double > @llvm.x86.fma.vfmadd.sd(< 2 x double >, < 2 x double >, < 2 x double >) nounwind readnone
|
2011-11-25 20:33:42 +01:00
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 4 x float > @test_x86_fma_vfmadd_ps(< 4 x float > %a0, < 4 x float > %a1, < 4 x float > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfmaddps
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 4 x float > @llvm.x86.fma.vfmadd.ps(< 4 x float > %a0, < 4 x float > %a1, < 4 x float > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 4 x float > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 4 x float > @test_x86_fma_vfmadd_ps_load(< 4 x float > %a0, < 4 x float > %a1, < 4 x float >* %a2) {
|
2011-12-30 03:18:36 +01:00
|
|
|
; CHECK: vfmaddps (%{{.*}})
|
|
|
|
%x = load <4 x float>* %a2
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 4 x float > @llvm.x86.fma.vfmadd.ps(< 4 x float > %a0, < 4 x float > %a1, < 4 x float > %x) ; <i64> [#uses=1]
|
2011-12-30 03:18:36 +01:00
|
|
|
ret < 4 x float > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 4 x float > @test_x86_fma_vfmadd_ps_load2(< 4 x float > %a0, < 4 x float >* %a1, < 4 x float > %a2) {
|
2011-12-30 03:18:36 +01:00
|
|
|
; CHECK: vfmaddps %{{.*}}, (%{{.*}})
|
|
|
|
%x = load <4 x float>* %a1
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 4 x float > @llvm.x86.fma.vfmadd.ps(< 4 x float > %a0, < 4 x float > %x, < 4 x float > %a2) ; <i64> [#uses=1]
|
2011-12-30 03:18:36 +01:00
|
|
|
ret < 4 x float > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 4 x float > @llvm.x86.fma.vfmadd.ps(< 4 x float >, < 4 x float >, < 4 x float >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
2012-11-27 08:19:54 +01:00
|
|
|
; 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 %{{.*}}, (%{{.*}})
|
|
|
|
%x = load <4 x float>* %a0
|
|
|
|
%y = load <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) ; <i64> [#uses=1]
|
|
|
|
ret < 4 x float > %res
|
|
|
|
}
|
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 2 x double > @test_x86_fma_vfmadd_pd(< 2 x double > %a0, < 2 x double > %a1, < 2 x double > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfmaddpd
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 2 x double > @llvm.x86.fma.vfmadd.pd(< 2 x double > %a0, < 2 x double > %a1, < 2 x double > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 2 x double > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 2 x double > @test_x86_fma_vfmadd_pd_load(< 2 x double > %a0, < 2 x double > %a1, < 2 x double >* %a2) {
|
2011-12-30 03:18:36 +01:00
|
|
|
; CHECK: vfmaddpd (%{{.*}})
|
|
|
|
%x = load <2 x double>* %a2
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 2 x double > @llvm.x86.fma.vfmadd.pd(< 2 x double > %a0, < 2 x double > %a1, < 2 x double > %x) ; <i64> [#uses=1]
|
2011-12-30 03:18:36 +01:00
|
|
|
ret < 2 x double > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 2 x double > @test_x86_fma_vfmadd_pd_load2(< 2 x double > %a0, < 2 x double >* %a1, < 2 x double > %a2) {
|
2011-12-30 03:18:36 +01:00
|
|
|
; CHECK: vfmaddpd %{{.*}}, (%{{.*}})
|
|
|
|
%x = load <2 x double>* %a1
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 2 x double > @llvm.x86.fma.vfmadd.pd(< 2 x double > %a0, < 2 x double > %x, < 2 x double > %a2) ; <i64> [#uses=1]
|
2011-12-30 03:18:36 +01:00
|
|
|
ret < 2 x double > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 2 x double > @llvm.x86.fma.vfmadd.pd(< 2 x double >, < 2 x double >, < 2 x double >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
2012-11-27 08:19:54 +01:00
|
|
|
; 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 %{{.*}}, (%{{.*}})
|
|
|
|
%x = load <2 x double>* %a0
|
|
|
|
%y = load <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) ; <i64> [#uses=1]
|
|
|
|
ret < 2 x double > %res
|
|
|
|
}
|
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 8 x float > @test_x86_fma_vfmadd_ps_256(< 8 x float > %a0, < 8 x float > %a1, < 8 x float > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfmaddps
|
|
|
|
; CHECK: ymm
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 8 x float > @llvm.x86.fma.vfmadd.ps.256(< 8 x float > %a0, < 8 x float > %a1, < 8 x float > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 8 x float > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 8 x float > @llvm.x86.fma.vfmadd.ps.256(< 8 x float >, < 8 x float >, < 8 x float >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 4 x double > @test_x86_fma_vfmadd_pd_256(< 4 x double > %a0, < 4 x double > %a1, < 4 x double > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfmaddpd
|
|
|
|
; CHECK: ymm
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 4 x double > @llvm.x86.fma.vfmadd.pd.256(< 4 x double > %a0, < 4 x double > %a1, < 4 x double > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 4 x double > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 4 x double > @llvm.x86.fma.vfmadd.pd.256(< 4 x double >, < 4 x double >, < 4 x double >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
|
|
|
; VFMSUB
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 4 x float > @test_x86_fma_vfmsub_ss(< 4 x float > %a0, < 4 x float > %a1, < 4 x float > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfmsubss
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 4 x float > @llvm.x86.fma.vfmsub.ss(< 4 x float > %a0, < 4 x float > %a1, < 4 x float > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 4 x float > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 4 x float > @llvm.x86.fma.vfmsub.ss(< 4 x float >, < 4 x float >, < 4 x float >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 2 x double > @test_x86_fma_vfmsub_sd(< 2 x double > %a0, < 2 x double > %a1, < 2 x double > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfmsubsd
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 2 x double > @llvm.x86.fma.vfmsub.sd(< 2 x double > %a0, < 2 x double > %a1, < 2 x double > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 2 x double > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 2 x double > @llvm.x86.fma.vfmsub.sd(< 2 x double >, < 2 x double >, < 2 x double >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 4 x float > @test_x86_fma_vfmsub_ps(< 4 x float > %a0, < 4 x float > %a1, < 4 x float > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfmsubps
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 4 x float > @llvm.x86.fma.vfmsub.ps(< 4 x float > %a0, < 4 x float > %a1, < 4 x float > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 4 x float > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 4 x float > @llvm.x86.fma.vfmsub.ps(< 4 x float >, < 4 x float >, < 4 x float >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 2 x double > @test_x86_fma_vfmsub_pd(< 2 x double > %a0, < 2 x double > %a1, < 2 x double > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfmsubpd
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 2 x double > @llvm.x86.fma.vfmsub.pd(< 2 x double > %a0, < 2 x double > %a1, < 2 x double > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 2 x double > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 2 x double > @llvm.x86.fma.vfmsub.pd(< 2 x double >, < 2 x double >, < 2 x double >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 8 x float > @test_x86_fma_vfmsub_ps_256(< 8 x float > %a0, < 8 x float > %a1, < 8 x float > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfmsubps
|
|
|
|
; CHECK: ymm
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 8 x float > @llvm.x86.fma.vfmsub.ps.256(< 8 x float > %a0, < 8 x float > %a1, < 8 x float > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 8 x float > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 8 x float > @llvm.x86.fma.vfmsub.ps.256(< 8 x float >, < 8 x float >, < 8 x float >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 4 x double > @test_x86_fma_vfmsub_pd_256(< 4 x double > %a0, < 4 x double > %a1, < 4 x double > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfmsubpd
|
|
|
|
; CHECK: ymm
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 4 x double > @llvm.x86.fma.vfmsub.pd.256(< 4 x double > %a0, < 4 x double > %a1, < 4 x double > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 4 x double > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 4 x double > @llvm.x86.fma.vfmsub.pd.256(< 4 x double >, < 4 x double >, < 4 x double >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
|
|
|
; VFNMADD
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 4 x float > @test_x86_fma_vfnmadd_ss(< 4 x float > %a0, < 4 x float > %a1, < 4 x float > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfnmaddss
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 4 x float > @llvm.x86.fma.vfnmadd.ss(< 4 x float > %a0, < 4 x float > %a1, < 4 x float > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 4 x float > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 4 x float > @llvm.x86.fma.vfnmadd.ss(< 4 x float >, < 4 x float >, < 4 x float >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 2 x double > @test_x86_fma_vfnmadd_sd(< 2 x double > %a0, < 2 x double > %a1, < 2 x double > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfnmaddsd
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 2 x double > @llvm.x86.fma.vfnmadd.sd(< 2 x double > %a0, < 2 x double > %a1, < 2 x double > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 2 x double > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 2 x double > @llvm.x86.fma.vfnmadd.sd(< 2 x double >, < 2 x double >, < 2 x double >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 4 x float > @test_x86_fma_vfnmadd_ps(< 4 x float > %a0, < 4 x float > %a1, < 4 x float > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfnmaddps
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 4 x float > @llvm.x86.fma.vfnmadd.ps(< 4 x float > %a0, < 4 x float > %a1, < 4 x float > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 4 x float > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 4 x float > @llvm.x86.fma.vfnmadd.ps(< 4 x float >, < 4 x float >, < 4 x float >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 2 x double > @test_x86_fma_vfnmadd_pd(< 2 x double > %a0, < 2 x double > %a1, < 2 x double > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfnmaddpd
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 2 x double > @llvm.x86.fma.vfnmadd.pd(< 2 x double > %a0, < 2 x double > %a1, < 2 x double > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 2 x double > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 2 x double > @llvm.x86.fma.vfnmadd.pd(< 2 x double >, < 2 x double >, < 2 x double >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 8 x float > @test_x86_fma_vfnmadd_ps_256(< 8 x float > %a0, < 8 x float > %a1, < 8 x float > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfnmaddps
|
|
|
|
; CHECK: ymm
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 8 x float > @llvm.x86.fma.vfnmadd.ps.256(< 8 x float > %a0, < 8 x float > %a1, < 8 x float > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 8 x float > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 8 x float > @llvm.x86.fma.vfnmadd.ps.256(< 8 x float >, < 8 x float >, < 8 x float >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 4 x double > @test_x86_fma_vfnmadd_pd_256(< 4 x double > %a0, < 4 x double > %a1, < 4 x double > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfnmaddpd
|
|
|
|
; CHECK: ymm
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 4 x double > @llvm.x86.fma.vfnmadd.pd.256(< 4 x double > %a0, < 4 x double > %a1, < 4 x double > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 4 x double > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 4 x double > @llvm.x86.fma.vfnmadd.pd.256(< 4 x double >, < 4 x double >, < 4 x double >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
|
|
|
; VFNMSUB
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 4 x float > @test_x86_fma_vfnmsub_ss(< 4 x float > %a0, < 4 x float > %a1, < 4 x float > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfnmsubss
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 4 x float > @llvm.x86.fma.vfnmsub.ss(< 4 x float > %a0, < 4 x float > %a1, < 4 x float > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 4 x float > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 4 x float > @llvm.x86.fma.vfnmsub.ss(< 4 x float >, < 4 x float >, < 4 x float >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 2 x double > @test_x86_fma_vfnmsub_sd(< 2 x double > %a0, < 2 x double > %a1, < 2 x double > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfnmsubsd
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 2 x double > @llvm.x86.fma.vfnmsub.sd(< 2 x double > %a0, < 2 x double > %a1, < 2 x double > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 2 x double > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 2 x double > @llvm.x86.fma.vfnmsub.sd(< 2 x double >, < 2 x double >, < 2 x double >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 4 x float > @test_x86_fma_vfnmsub_ps(< 4 x float > %a0, < 4 x float > %a1, < 4 x float > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfnmsubps
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 4 x float > @llvm.x86.fma.vfnmsub.ps(< 4 x float > %a0, < 4 x float > %a1, < 4 x float > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 4 x float > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 4 x float > @llvm.x86.fma.vfnmsub.ps(< 4 x float >, < 4 x float >, < 4 x float >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 2 x double > @test_x86_fma_vfnmsub_pd(< 2 x double > %a0, < 2 x double > %a1, < 2 x double > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfnmsubpd
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 2 x double > @llvm.x86.fma.vfnmsub.pd(< 2 x double > %a0, < 2 x double > %a1, < 2 x double > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 2 x double > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 2 x double > @llvm.x86.fma.vfnmsub.pd(< 2 x double >, < 2 x double >, < 2 x double >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 8 x float > @test_x86_fma_vfnmsub_ps_256(< 8 x float > %a0, < 8 x float > %a1, < 8 x float > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfnmsubps
|
|
|
|
; CHECK: ymm
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 8 x float > @llvm.x86.fma.vfnmsub.ps.256(< 8 x float > %a0, < 8 x float > %a1, < 8 x float > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 8 x float > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 8 x float > @llvm.x86.fma.vfnmsub.ps.256(< 8 x float >, < 8 x float >, < 8 x float >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 4 x double > @test_x86_fma_vfnmsub_pd_256(< 4 x double > %a0, < 4 x double > %a1, < 4 x double > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfnmsubpd
|
|
|
|
; CHECK: ymm
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 4 x double > @llvm.x86.fma.vfnmsub.pd.256(< 4 x double > %a0, < 4 x double > %a1, < 4 x double > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 4 x double > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 4 x double > @llvm.x86.fma.vfnmsub.pd.256(< 4 x double >, < 4 x double >, < 4 x double >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
|
|
|
; VFMADDSUB
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 4 x float > @test_x86_fma_vfmaddsub_ps(< 4 x float > %a0, < 4 x float > %a1, < 4 x float > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfmaddsubps
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 4 x float > @llvm.x86.fma.vfmaddsub.ps(< 4 x float > %a0, < 4 x float > %a1, < 4 x float > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 4 x float > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 4 x float > @llvm.x86.fma.vfmaddsub.ps(< 4 x float >, < 4 x float >, < 4 x float >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 2 x double > @test_x86_fma_vfmaddsub_pd(< 2 x double > %a0, < 2 x double > %a1, < 2 x double > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfmaddsubpd
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 2 x double > @llvm.x86.fma.vfmaddsub.pd(< 2 x double > %a0, < 2 x double > %a1, < 2 x double > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 2 x double > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 2 x double > @llvm.x86.fma.vfmaddsub.pd(< 2 x double >, < 2 x double >, < 2 x double >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 8 x float > @test_x86_fma_vfmaddsub_ps_256(< 8 x float > %a0, < 8 x float > %a1, < 8 x float > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfmaddsubps
|
|
|
|
; CHECK: ymm
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 8 x float > @llvm.x86.fma.vfmaddsub.ps.256(< 8 x float > %a0, < 8 x float > %a1, < 8 x float > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 8 x float > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 8 x float > @llvm.x86.fma.vfmaddsub.ps.256(< 8 x float >, < 8 x float >, < 8 x float >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 4 x double > @test_x86_fma_vfmaddsub_pd_256(< 4 x double > %a0, < 4 x double > %a1, < 4 x double > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfmaddsubpd
|
|
|
|
; CHECK: ymm
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 4 x double > @llvm.x86.fma.vfmaddsub.pd.256(< 4 x double > %a0, < 4 x double > %a1, < 4 x double > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 4 x double > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 4 x double > @llvm.x86.fma.vfmaddsub.pd.256(< 4 x double >, < 4 x double >, < 4 x double >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
|
|
|
; VFMSUBADD
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 4 x float > @test_x86_fma_vfmsubadd_ps(< 4 x float > %a0, < 4 x float > %a1, < 4 x float > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfmsubaddps
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 4 x float > @llvm.x86.fma.vfmsubadd.ps(< 4 x float > %a0, < 4 x float > %a1, < 4 x float > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 4 x float > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 4 x float > @llvm.x86.fma.vfmsubadd.ps(< 4 x float >, < 4 x float >, < 4 x float >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 2 x double > @test_x86_fma_vfmsubadd_pd(< 2 x double > %a0, < 2 x double > %a1, < 2 x double > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfmsubaddpd
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 2 x double > @llvm.x86.fma.vfmsubadd.pd(< 2 x double > %a0, < 2 x double > %a1, < 2 x double > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 2 x double > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 2 x double > @llvm.x86.fma.vfmsubadd.pd(< 2 x double >, < 2 x double >, < 2 x double >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 8 x float > @test_x86_fma_vfmsubadd_ps_256(< 8 x float > %a0, < 8 x float > %a1, < 8 x float > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfmsubaddps
|
|
|
|
; CHECK: ymm
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 8 x float > @llvm.x86.fma.vfmsubadd.ps.256(< 8 x float > %a0, < 8 x float > %a1, < 8 x float > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 8 x float > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 8 x float > @llvm.x86.fma.vfmsubadd.ps.256(< 8 x float >, < 8 x float >, < 8 x float >) nounwind readnone
|
2011-11-30 23:09:42 +01:00
|
|
|
|
2012-06-03 09:26:46 +02:00
|
|
|
define < 4 x double > @test_x86_fma_vfmsubadd_pd_256(< 4 x double > %a0, < 4 x double > %a1, < 4 x double > %a2) {
|
2011-11-30 23:09:42 +01:00
|
|
|
; CHECK: vfmsubaddpd
|
|
|
|
; CHECK: ymm
|
2012-06-03 09:26:46 +02:00
|
|
|
%res = call < 4 x double > @llvm.x86.fma.vfmsubadd.pd.256(< 4 x double > %a0, < 4 x double > %a1, < 4 x double > %a2) ; <i64> [#uses=1]
|
2011-11-30 23:09:42 +01:00
|
|
|
ret < 4 x double > %res
|
|
|
|
}
|
2012-06-03 09:26:46 +02:00
|
|
|
declare < 4 x double > @llvm.x86.fma.vfmsubadd.pd.256(< 4 x double >, < 4 x double >, < 4 x double >) nounwind readnone
|