2016-05-29 02:03:41 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
2017-07-26 18:54:51 +08:00
|
|
|
; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=avx,pclmul -show-mc-encoding | FileCheck %s --check-prefix=CHECK --check-prefix=AVX
|
|
|
|
; RUN: llc < %s -mtriple=i686-unknown-unknown -mcpu=skx -show-mc-encoding | FileCheck %s --check-prefix=CHECK --check-prefix=AVX512VL
|
2010-08-12 01:39:23 +08:00
|
|
|
|
2010-08-12 05:12:09 +08:00
|
|
|
define <4 x double> @test_x86_avx_addsub_pd_256(<4 x double> %a0, <4 x double> %a1) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_addsub_pd_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: vaddsubpd %ymm1, %ymm0, %ymm0 # encoding: [0xc5,0xfd,0xd0,0xc1]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <4 x double> @llvm.x86.avx.addsub.pd.256(<4 x double> %a0, <4 x double> %a1) ; <<4 x double>> [#uses=1]
|
|
|
|
ret <4 x double> %res
|
|
|
|
}
|
|
|
|
declare <4 x double> @llvm.x86.avx.addsub.pd.256(<4 x double>, <4 x double>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <8 x float> @test_x86_avx_addsub_ps_256(<8 x float> %a0, <8 x float> %a1) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_addsub_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: vaddsubps %ymm1, %ymm0, %ymm0 # encoding: [0xc5,0xff,0xd0,0xc1]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.avx.addsub.ps.256(<8 x float> %a0, <8 x float> %a1) ; <<8 x float>> [#uses=1]
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
declare <8 x float> @llvm.x86.avx.addsub.ps.256(<8 x float>, <8 x float>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <4 x double> @test_x86_avx_blendv_pd_256(<4 x double> %a0, <4 x double> %a1, <4 x double> %a2) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_blendv_pd_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: vblendvpd %ymm2, %ymm1, %ymm0, %ymm0 # encoding: [0xc4,0xe3,0x7d,0x4b,0xc1,0x20]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <4 x double> @llvm.x86.avx.blendv.pd.256(<4 x double> %a0, <4 x double> %a1, <4 x double> %a2) ; <<4 x double>> [#uses=1]
|
|
|
|
ret <4 x double> %res
|
|
|
|
}
|
|
|
|
declare <4 x double> @llvm.x86.avx.blendv.pd.256(<4 x double>, <4 x double>, <4 x double>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <8 x float> @test_x86_avx_blendv_ps_256(<8 x float> %a0, <8 x float> %a1, <8 x float> %a2) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_blendv_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: vblendvps %ymm2, %ymm1, %ymm0, %ymm0 # encoding: [0xc4,0xe3,0x7d,0x4a,0xc1,0x20]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.avx.blendv.ps.256(<8 x float> %a0, <8 x float> %a1, <8 x float> %a2) ; <<8 x float>> [#uses=1]
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
declare <8 x float> @llvm.x86.avx.blendv.ps.256(<8 x float>, <8 x float>, <8 x float>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <4 x double> @test_x86_avx_cmp_pd_256(<4 x double> %a0, <4 x double> %a1) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_cmp_pd_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: vcmpordpd %ymm1, %ymm0, %ymm0 # encoding: [0xc5,0xfd,0xc2,0xc1,0x07]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <4 x double> @llvm.x86.avx.cmp.pd.256(<4 x double> %a0, <4 x double> %a1, i8 7) ; <<4 x double>> [#uses=1]
|
|
|
|
ret <4 x double> %res
|
|
|
|
}
|
|
|
|
declare <4 x double> @llvm.x86.avx.cmp.pd.256(<4 x double>, <4 x double>, i8) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <8 x float> @test_x86_avx_cmp_ps_256(<8 x float> %a0, <8 x float> %a1) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_cmp_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: vcmpordps %ymm1, %ymm0, %ymm0 # encoding: [0xc5,0xfc,0xc2,0xc1,0x07]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a1, i8 7) ; <<8 x float>> [#uses=1]
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
2012-02-08 16:37:26 +08:00
|
|
|
|
|
|
|
define <8 x float> @test_x86_avx_cmp_ps_256_pseudo_op(<8 x float> %a0, <8 x float> %a1) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_cmp_ps_256_pseudo_op:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: vcmpeqps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x00]
|
|
|
|
; CHECK-NEXT: vcmpltps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x01]
|
|
|
|
; CHECK-NEXT: vcmpleps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x02]
|
|
|
|
; CHECK-NEXT: vcmpunordps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x03]
|
|
|
|
; CHECK-NEXT: vcmpneqps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x04]
|
|
|
|
; CHECK-NEXT: vcmpnltps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x05]
|
|
|
|
; CHECK-NEXT: vcmpnleps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x06]
|
|
|
|
; CHECK-NEXT: vcmpordps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x07]
|
|
|
|
; CHECK-NEXT: vcmpeq_uqps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x08]
|
|
|
|
; CHECK-NEXT: vcmpngeps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x09]
|
|
|
|
; CHECK-NEXT: vcmpngtps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x0a]
|
|
|
|
; CHECK-NEXT: vcmpfalseps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x0b]
|
|
|
|
; CHECK-NEXT: vcmpneq_oqps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x0c]
|
|
|
|
; CHECK-NEXT: vcmpgeps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x0d]
|
|
|
|
; CHECK-NEXT: vcmpgtps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x0e]
|
|
|
|
; CHECK-NEXT: vcmptrueps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x0f]
|
|
|
|
; CHECK-NEXT: vcmpeq_osps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x10]
|
|
|
|
; CHECK-NEXT: vcmplt_oqps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x11]
|
|
|
|
; CHECK-NEXT: vcmple_oqps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x12]
|
|
|
|
; CHECK-NEXT: vcmpunord_sps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x13]
|
|
|
|
; CHECK-NEXT: vcmpneq_usps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x14]
|
|
|
|
; CHECK-NEXT: vcmpnlt_uqps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x15]
|
|
|
|
; CHECK-NEXT: vcmpnle_uqps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x16]
|
|
|
|
; CHECK-NEXT: vcmpord_sps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x17]
|
|
|
|
; CHECK-NEXT: vcmpeq_usps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x18]
|
|
|
|
; CHECK-NEXT: vcmpnge_uqps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x19]
|
|
|
|
; CHECK-NEXT: vcmpngt_uqps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x1a]
|
|
|
|
; CHECK-NEXT: vcmpfalse_osps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x1b]
|
|
|
|
; CHECK-NEXT: vcmpneq_osps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x1c]
|
|
|
|
; CHECK-NEXT: vcmpge_oqps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x1d]
|
|
|
|
; CHECK-NEXT: vcmpgt_oqps %ymm1, %ymm0, %ymm1 # encoding: [0xc5,0xfc,0xc2,0xc9,0x1e]
|
|
|
|
; CHECK-NEXT: vcmptrue_usps %ymm1, %ymm0, %ymm0 # encoding: [0xc5,0xfc,0xc2,0xc1,0x1f]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2012-02-08 16:37:26 +08:00
|
|
|
%a2 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a1, i8 0) ; <<8 x float>> [#uses=1]
|
|
|
|
%a3 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a2, i8 1) ; <<8 x float>> [#uses=1]
|
|
|
|
%a4 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a3, i8 2) ; <<8 x float>> [#uses=1]
|
|
|
|
%a5 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a4, i8 3) ; <<8 x float>> [#uses=1]
|
|
|
|
%a6 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a5, i8 4) ; <<8 x float>> [#uses=1]
|
|
|
|
%a7 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a6, i8 5) ; <<8 x float>> [#uses=1]
|
|
|
|
%a8 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a7, i8 6) ; <<8 x float>> [#uses=1]
|
|
|
|
%a9 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a8, i8 7) ; <<8 x float>> [#uses=1]
|
|
|
|
%a10 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a9, i8 8) ; <<8 x float>> [#uses=1]
|
|
|
|
%a11 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a10, i8 9) ; <<8 x float>> [#uses=1]
|
|
|
|
%a12 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a11, i8 10) ; <<8 x float>> [#uses=1]
|
|
|
|
%a13 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a12, i8 11) ; <<8 x float>> [#uses=1]
|
|
|
|
%a14 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a13, i8 12) ; <<8 x float>> [#uses=1]
|
|
|
|
%a15 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a14, i8 13) ; <<8 x float>> [#uses=1]
|
|
|
|
%a16 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a15, i8 14) ; <<8 x float>> [#uses=1]
|
|
|
|
%a17 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a16, i8 15) ; <<8 x float>> [#uses=1]
|
|
|
|
%a18 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a17, i8 16) ; <<8 x float>> [#uses=1]
|
|
|
|
%a19 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a18, i8 17) ; <<8 x float>> [#uses=1]
|
|
|
|
%a20 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a19, i8 18) ; <<8 x float>> [#uses=1]
|
|
|
|
%a21 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a20, i8 19) ; <<8 x float>> [#uses=1]
|
|
|
|
%a22 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a21, i8 20) ; <<8 x float>> [#uses=1]
|
|
|
|
%a23 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a22, i8 21) ; <<8 x float>> [#uses=1]
|
|
|
|
%a24 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a23, i8 22) ; <<8 x float>> [#uses=1]
|
|
|
|
%a25 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a24, i8 23) ; <<8 x float>> [#uses=1]
|
|
|
|
%a26 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a25, i8 24) ; <<8 x float>> [#uses=1]
|
|
|
|
%a27 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a26, i8 25) ; <<8 x float>> [#uses=1]
|
|
|
|
%a28 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a27, i8 26) ; <<8 x float>> [#uses=1]
|
|
|
|
%a29 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a28, i8 27) ; <<8 x float>> [#uses=1]
|
|
|
|
%a30 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a29, i8 28) ; <<8 x float>> [#uses=1]
|
|
|
|
%a31 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a30, i8 29) ; <<8 x float>> [#uses=1]
|
|
|
|
%a32 = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a31, i8 30) ; <<8 x float>> [#uses=1]
|
|
|
|
%res = call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %a0, <8 x float> %a32, i8 31) ; <<8 x float>> [#uses=1]
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
2010-08-12 05:12:09 +08:00
|
|
|
declare <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float>, <8 x float>, i8) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <4 x float> @test_x86_avx_cvt_pd2_ps_256(<4 x double> %a0) {
|
2016-05-20 13:10:32 +08:00
|
|
|
; AVX-LABEL: test_x86_avx_cvt_pd2_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX: # BB#0:
|
|
|
|
; AVX-NEXT: vcvtpd2ps %ymm0, %xmm0 # encoding: [0xc5,0xfd,0x5a,0xc0]
|
|
|
|
; AVX-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; AVX-NEXT: retl # encoding: [0xc3]
|
2016-05-20 13:10:32 +08:00
|
|
|
;
|
|
|
|
; AVX512VL-LABEL: test_x86_avx_cvt_pd2_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX512VL: # BB#0:
|
|
|
|
; AVX512VL-NEXT: vcvtpd2ps %ymm0, %xmm0 # EVEX TO VEX Compression encoding: [0xc5,0xfd,0x5a,0xc0]
|
|
|
|
; AVX512VL-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; AVX512VL-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.avx.cvt.pd2.ps.256(<4 x double> %a0) ; <<4 x float>> [#uses=1]
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
|
|
|
declare <4 x float> @llvm.x86.avx.cvt.pd2.ps.256(<4 x double>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <4 x i32> @test_x86_avx_cvt_pd2dq_256(<4 x double> %a0) {
|
2016-05-20 13:10:32 +08:00
|
|
|
; AVX-LABEL: test_x86_avx_cvt_pd2dq_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX: # BB#0:
|
|
|
|
; AVX-NEXT: vcvtpd2dq %ymm0, %xmm0 # encoding: [0xc5,0xff,0xe6,0xc0]
|
|
|
|
; AVX-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; AVX-NEXT: retl # encoding: [0xc3]
|
2016-05-20 13:10:32 +08:00
|
|
|
;
|
|
|
|
; AVX512VL-LABEL: test_x86_avx_cvt_pd2dq_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX512VL: # BB#0:
|
|
|
|
; AVX512VL-NEXT: vcvtpd2dq %ymm0, %xmm0 # EVEX TO VEX Compression encoding: [0xc5,0xff,0xe6,0xc0]
|
|
|
|
; AVX512VL-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; AVX512VL-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <4 x i32> @llvm.x86.avx.cvt.pd2dq.256(<4 x double> %a0) ; <<4 x i32>> [#uses=1]
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
declare <4 x i32> @llvm.x86.avx.cvt.pd2dq.256(<4 x double>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <8 x i32> @test_x86_avx_cvt_ps2dq_256(<8 x float> %a0) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_cvt_ps2dq_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: vcvtps2dq %ymm0, %ymm0 # encoding: [0xc5,0xfd,0x5b,0xc0]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <8 x i32> @llvm.x86.avx.cvt.ps2dq.256(<8 x float> %a0) ; <<8 x i32>> [#uses=1]
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
declare <8 x i32> @llvm.x86.avx.cvt.ps2dq.256(<8 x float>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <8 x float> @test_x86_avx_cvtdq2_ps_256(<8 x i32> %a0) {
|
2016-11-06 12:12:42 +08:00
|
|
|
; AVX-LABEL: test_x86_avx_cvtdq2_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX: # BB#0:
|
|
|
|
; AVX-NEXT: vcvtdq2ps %ymm0, %ymm0 # encoding: [0xc5,0xfc,0x5b,0xc0]
|
|
|
|
; AVX-NEXT: retl # encoding: [0xc3]
|
2016-11-06 12:12:42 +08:00
|
|
|
;
|
|
|
|
; AVX512VL-LABEL: test_x86_avx_cvtdq2_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX512VL: # BB#0:
|
|
|
|
; AVX512VL-NEXT: vcvtdq2ps %ymm0, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfc,0x5b,0xc0]
|
|
|
|
; AVX512VL-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.avx.cvtdq2.ps.256(<8 x i32> %a0) ; <<8 x float>> [#uses=1]
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
declare <8 x float> @llvm.x86.avx.cvtdq2.ps.256(<8 x i32>) nounwind readnone
|
|
|
|
|
|
|
|
|
2016-07-19 23:07:43 +08:00
|
|
|
define <4 x i32> @test_x86_avx_cvtt_pd2dq_256(<4 x double> %a0) {
|
|
|
|
; AVX-LABEL: test_x86_avx_cvtt_pd2dq_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX: # BB#0:
|
|
|
|
; AVX-NEXT: vcvttpd2dq %ymm0, %xmm0 # encoding: [0xc5,0xfd,0xe6,0xc0]
|
|
|
|
; AVX-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; AVX-NEXT: retl # encoding: [0xc3]
|
2016-07-19 23:07:43 +08:00
|
|
|
;
|
|
|
|
; AVX512VL-LABEL: test_x86_avx_cvtt_pd2dq_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX512VL: # BB#0:
|
|
|
|
; AVX512VL-NEXT: vcvttpd2dq %ymm0, %xmm0 # EVEX TO VEX Compression encoding: [0xc5,0xfd,0xe6,0xc0]
|
|
|
|
; AVX512VL-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; AVX512VL-NEXT: retl # encoding: [0xc3]
|
2016-07-19 23:07:43 +08:00
|
|
|
%res = call <4 x i32> @llvm.x86.avx.cvtt.pd2dq.256(<4 x double> %a0) ; <<4 x i32>> [#uses=1]
|
|
|
|
ret <4 x i32> %res
|
|
|
|
}
|
|
|
|
declare <4 x i32> @llvm.x86.avx.cvtt.pd2dq.256(<4 x double>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <8 x i32> @test_x86_avx_cvtt_ps2dq_256(<8 x float> %a0) {
|
2016-11-10 15:24:52 +08:00
|
|
|
; AVX-LABEL: test_x86_avx_cvtt_ps2dq_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX: # BB#0:
|
|
|
|
; AVX-NEXT: vcvttps2dq %ymm0, %ymm0 # encoding: [0xc5,0xfe,0x5b,0xc0]
|
|
|
|
; AVX-NEXT: retl # encoding: [0xc3]
|
2016-11-10 15:24:52 +08:00
|
|
|
;
|
|
|
|
; AVX512VL-LABEL: test_x86_avx_cvtt_ps2dq_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX512VL: # BB#0:
|
|
|
|
; AVX512VL-NEXT: vcvttps2dq %ymm0, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfe,0x5b,0xc0]
|
|
|
|
; AVX512VL-NEXT: retl # encoding: [0xc3]
|
2016-07-19 23:07:43 +08:00
|
|
|
%res = call <8 x i32> @llvm.x86.avx.cvtt.ps2dq.256(<8 x float> %a0) ; <<8 x i32>> [#uses=1]
|
|
|
|
ret <8 x i32> %res
|
|
|
|
}
|
|
|
|
declare <8 x i32> @llvm.x86.avx.cvtt.ps2dq.256(<8 x float>) nounwind readnone
|
|
|
|
|
|
|
|
|
2010-08-12 05:12:09 +08:00
|
|
|
define <8 x float> @test_x86_avx_dp_ps_256(<8 x float> %a0, <8 x float> %a1) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_dp_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: vdpps $7, %ymm1, %ymm0, %ymm0 # encoding: [0xc4,0xe3,0x7d,0x40,0xc1,0x07]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
[x86] Fix a pretty horrible bug and inconsistency in the x86 asm
parsing (and latent bug in the instruction definitions).
This is effectively a revert of r136287 which tried to address
a specific and narrow case of immediate operands failing to be accepted
by x86 instructions with a pretty heavy hammer: it introduced a new kind
of operand that behaved differently. All of that is removed with this
commit, but the test cases are both preserved and enhanced.
The core problem that r136287 and this commit are trying to handle is
that gas accepts both of the following instructions:
insertps $192, %xmm0, %xmm1
insertps $-64, %xmm0, %xmm1
These will encode to the same byte sequence, with the immediate
occupying an 8-bit entry. The first form was fixed by r136287 but that
broke the prior handling of the second form! =[ Ironically, we would
still emit the second form in some cases and then be unable to
re-assemble the output.
The reason why the first instruction failed to be handled is because
prior to r136287 the operands ere marked 'i32i8imm' which forces them to
be sign-extenable. Clearly, that won't work for 192 in a single byte.
However, making thim zero-extended or "unsigned" doesn't really address
the core issue either because it breaks negative immediates. The correct
fix is to make these operands 'i8imm' reflecting that they can be either
signed or unsigned but must be 8-bit immediates. This patch backs out
r136287 and then changes those places as well as some others to use
'i8imm' rather than one of the extended variants.
Naturally, this broke something else. The custom DAG nodes had to be
updated to have a much more accurate type constraint of an i8 node, and
a bunch of Pat immediates needed to be specified as i8 values.
The fallout didn't end there though. We also then ceased to be able to
match the instruction-specific intrinsics to the instructions so
modified. Digging, this is because they too used i32 rather than i8 in
their signature. So I've also switched those intrinsics to i8 arguments
in line with the instructions.
In order to make the intrinsic adjustments of course, I also had to add
auto upgrading for the intrinsics.
I suspect that the intrinsic argument types may have led everything down
this rabbit hole. Pretty happy with the result.
llvm-svn: 217310
2014-09-06 18:00:01 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.avx.dp.ps.256(<8 x float> %a0, <8 x float> %a1, i8 7) ; <<8 x float>> [#uses=1]
|
2010-08-12 05:12:09 +08:00
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
[x86] Fix a pretty horrible bug and inconsistency in the x86 asm
parsing (and latent bug in the instruction definitions).
This is effectively a revert of r136287 which tried to address
a specific and narrow case of immediate operands failing to be accepted
by x86 instructions with a pretty heavy hammer: it introduced a new kind
of operand that behaved differently. All of that is removed with this
commit, but the test cases are both preserved and enhanced.
The core problem that r136287 and this commit are trying to handle is
that gas accepts both of the following instructions:
insertps $192, %xmm0, %xmm1
insertps $-64, %xmm0, %xmm1
These will encode to the same byte sequence, with the immediate
occupying an 8-bit entry. The first form was fixed by r136287 but that
broke the prior handling of the second form! =[ Ironically, we would
still emit the second form in some cases and then be unable to
re-assemble the output.
The reason why the first instruction failed to be handled is because
prior to r136287 the operands ere marked 'i32i8imm' which forces them to
be sign-extenable. Clearly, that won't work for 192 in a single byte.
However, making thim zero-extended or "unsigned" doesn't really address
the core issue either because it breaks negative immediates. The correct
fix is to make these operands 'i8imm' reflecting that they can be either
signed or unsigned but must be 8-bit immediates. This patch backs out
r136287 and then changes those places as well as some others to use
'i8imm' rather than one of the extended variants.
Naturally, this broke something else. The custom DAG nodes had to be
updated to have a much more accurate type constraint of an i8 node, and
a bunch of Pat immediates needed to be specified as i8 values.
The fallout didn't end there though. We also then ceased to be able to
match the instruction-specific intrinsics to the instructions so
modified. Digging, this is because they too used i32 rather than i8 in
their signature. So I've also switched those intrinsics to i8 arguments
in line with the instructions.
In order to make the intrinsic adjustments of course, I also had to add
auto upgrading for the intrinsics.
I suspect that the intrinsic argument types may have led everything down
this rabbit hole. Pretty happy with the result.
llvm-svn: 217310
2014-09-06 18:00:01 +08:00
|
|
|
declare <8 x float> @llvm.x86.avx.dp.ps.256(<8 x float>, <8 x float>, i8) nounwind readnone
|
2010-08-12 05:12:09 +08:00
|
|
|
|
|
|
|
|
|
|
|
define <4 x double> @test_x86_avx_hadd_pd_256(<4 x double> %a0, <4 x double> %a1) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_hadd_pd_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: vhaddpd %ymm1, %ymm0, %ymm0 # encoding: [0xc5,0xfd,0x7c,0xc1]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <4 x double> @llvm.x86.avx.hadd.pd.256(<4 x double> %a0, <4 x double> %a1) ; <<4 x double>> [#uses=1]
|
|
|
|
ret <4 x double> %res
|
|
|
|
}
|
|
|
|
declare <4 x double> @llvm.x86.avx.hadd.pd.256(<4 x double>, <4 x double>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <8 x float> @test_x86_avx_hadd_ps_256(<8 x float> %a0, <8 x float> %a1) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_hadd_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: vhaddps %ymm1, %ymm0, %ymm0 # encoding: [0xc5,0xff,0x7c,0xc1]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.avx.hadd.ps.256(<8 x float> %a0, <8 x float> %a1) ; <<8 x float>> [#uses=1]
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
declare <8 x float> @llvm.x86.avx.hadd.ps.256(<8 x float>, <8 x float>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <4 x double> @test_x86_avx_hsub_pd_256(<4 x double> %a0, <4 x double> %a1) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_hsub_pd_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: vhsubpd %ymm1, %ymm0, %ymm0 # encoding: [0xc5,0xfd,0x7d,0xc1]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <4 x double> @llvm.x86.avx.hsub.pd.256(<4 x double> %a0, <4 x double> %a1) ; <<4 x double>> [#uses=1]
|
|
|
|
ret <4 x double> %res
|
|
|
|
}
|
|
|
|
declare <4 x double> @llvm.x86.avx.hsub.pd.256(<4 x double>, <4 x double>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <8 x float> @test_x86_avx_hsub_ps_256(<8 x float> %a0, <8 x float> %a1) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_hsub_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: vhsubps %ymm1, %ymm0, %ymm0 # encoding: [0xc5,0xff,0x7d,0xc1]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.avx.hsub.ps.256(<8 x float> %a0, <8 x float> %a1) ; <<8 x float>> [#uses=1]
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
declare <8 x float> @llvm.x86.avx.hsub.ps.256(<8 x float>, <8 x float>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <32 x i8> @test_x86_avx_ldu_dq_256(i8* %a0) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_ldu_dq_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
|
|
|
|
; CHECK-NEXT: vlddqu (%eax), %ymm0 # encoding: [0xc5,0xff,0xf0,0x00]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <32 x i8> @llvm.x86.avx.ldu.dq.256(i8* %a0) ; <<32 x i8>> [#uses=1]
|
|
|
|
ret <32 x i8> %res
|
|
|
|
}
|
|
|
|
declare <32 x i8> @llvm.x86.avx.ldu.dq.256(i8*) nounwind readonly
|
|
|
|
|
|
|
|
|
2015-10-20 19:20:13 +08:00
|
|
|
define <2 x double> @test_x86_avx_maskload_pd(i8* %a0, <2 x i64> %mask) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_maskload_pd:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
|
|
|
|
; CHECK-NEXT: vmaskmovpd (%eax), %xmm0, %xmm0 # encoding: [0xc4,0xe2,0x79,0x2d,0x00]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2015-10-20 19:20:13 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.avx.maskload.pd(i8* %a0, <2 x i64> %mask) ; <<2 x double>> [#uses=1]
|
2010-08-12 05:12:09 +08:00
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
2015-10-20 19:20:13 +08:00
|
|
|
declare <2 x double> @llvm.x86.avx.maskload.pd(i8*, <2 x i64>) nounwind readonly
|
2010-08-12 05:12:09 +08:00
|
|
|
|
|
|
|
|
2015-10-20 19:20:13 +08:00
|
|
|
define <4 x double> @test_x86_avx_maskload_pd_256(i8* %a0, <4 x i64> %mask) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_maskload_pd_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
|
|
|
|
; CHECK-NEXT: vmaskmovpd (%eax), %ymm0, %ymm0 # encoding: [0xc4,0xe2,0x7d,0x2d,0x00]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2015-10-20 19:20:13 +08:00
|
|
|
%res = call <4 x double> @llvm.x86.avx.maskload.pd.256(i8* %a0, <4 x i64> %mask) ; <<4 x double>> [#uses=1]
|
2010-08-12 05:12:09 +08:00
|
|
|
ret <4 x double> %res
|
|
|
|
}
|
2015-10-20 19:20:13 +08:00
|
|
|
declare <4 x double> @llvm.x86.avx.maskload.pd.256(i8*, <4 x i64>) nounwind readonly
|
2010-08-12 05:12:09 +08:00
|
|
|
|
|
|
|
|
2015-10-20 19:20:13 +08:00
|
|
|
define <4 x float> @test_x86_avx_maskload_ps(i8* %a0, <4 x i32> %mask) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_maskload_ps:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
|
|
|
|
; CHECK-NEXT: vmaskmovps (%eax), %xmm0, %xmm0 # encoding: [0xc4,0xe2,0x79,0x2c,0x00]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2015-10-20 19:20:13 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.avx.maskload.ps(i8* %a0, <4 x i32> %mask) ; <<4 x float>> [#uses=1]
|
2010-08-12 05:12:09 +08:00
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
2015-10-20 19:20:13 +08:00
|
|
|
declare <4 x float> @llvm.x86.avx.maskload.ps(i8*, <4 x i32>) nounwind readonly
|
2010-08-12 05:12:09 +08:00
|
|
|
|
|
|
|
|
2015-10-20 19:20:13 +08:00
|
|
|
define <8 x float> @test_x86_avx_maskload_ps_256(i8* %a0, <8 x i32> %mask) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_maskload_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
|
|
|
|
; CHECK-NEXT: vmaskmovps (%eax), %ymm0, %ymm0 # encoding: [0xc4,0xe2,0x7d,0x2c,0x00]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2015-10-20 19:20:13 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.avx.maskload.ps.256(i8* %a0, <8 x i32> %mask) ; <<8 x float>> [#uses=1]
|
2010-08-12 05:12:09 +08:00
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
2015-10-20 19:20:13 +08:00
|
|
|
declare <8 x float> @llvm.x86.avx.maskload.ps.256(i8*, <8 x i32>) nounwind readonly
|
2010-08-12 05:12:09 +08:00
|
|
|
|
|
|
|
|
2015-10-20 19:20:13 +08:00
|
|
|
define void @test_x86_avx_maskstore_pd(i8* %a0, <2 x i64> %mask, <2 x double> %a2) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_maskstore_pd:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
|
|
|
|
; CHECK-NEXT: vmaskmovpd %xmm1, %xmm0, (%eax) # encoding: [0xc4,0xe2,0x79,0x2f,0x08]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2015-10-20 19:20:13 +08:00
|
|
|
call void @llvm.x86.avx.maskstore.pd(i8* %a0, <2 x i64> %mask, <2 x double> %a2)
|
2010-08-12 05:12:09 +08:00
|
|
|
ret void
|
|
|
|
}
|
2015-10-20 19:20:13 +08:00
|
|
|
declare void @llvm.x86.avx.maskstore.pd(i8*, <2 x i64>, <2 x double>) nounwind
|
2010-08-12 05:12:09 +08:00
|
|
|
|
|
|
|
|
2015-10-20 19:20:13 +08:00
|
|
|
define void @test_x86_avx_maskstore_pd_256(i8* %a0, <4 x i64> %mask, <4 x double> %a2) {
|
2017-03-03 17:03:24 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_maskstore_pd_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
|
|
|
|
; CHECK-NEXT: vmaskmovpd %ymm1, %ymm0, (%eax) # encoding: [0xc4,0xe2,0x7d,0x2f,0x08]
|
|
|
|
; CHECK-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2015-10-20 19:20:13 +08:00
|
|
|
call void @llvm.x86.avx.maskstore.pd.256(i8* %a0, <4 x i64> %mask, <4 x double> %a2)
|
2010-08-12 05:12:09 +08:00
|
|
|
ret void
|
|
|
|
}
|
2015-10-20 19:20:13 +08:00
|
|
|
declare void @llvm.x86.avx.maskstore.pd.256(i8*, <4 x i64>, <4 x double>) nounwind
|
2010-08-12 05:12:09 +08:00
|
|
|
|
|
|
|
|
2015-10-20 19:20:13 +08:00
|
|
|
define void @test_x86_avx_maskstore_ps(i8* %a0, <4 x i32> %mask, <4 x float> %a2) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_maskstore_ps:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
|
|
|
|
; CHECK-NEXT: vmaskmovps %xmm1, %xmm0, (%eax) # encoding: [0xc4,0xe2,0x79,0x2e,0x08]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2015-10-20 19:20:13 +08:00
|
|
|
call void @llvm.x86.avx.maskstore.ps(i8* %a0, <4 x i32> %mask, <4 x float> %a2)
|
2010-08-12 05:12:09 +08:00
|
|
|
ret void
|
|
|
|
}
|
2015-10-20 19:20:13 +08:00
|
|
|
declare void @llvm.x86.avx.maskstore.ps(i8*, <4 x i32>, <4 x float>) nounwind
|
2010-08-12 05:12:09 +08:00
|
|
|
|
|
|
|
|
2015-10-20 19:20:13 +08:00
|
|
|
define void @test_x86_avx_maskstore_ps_256(i8* %a0, <8 x i32> %mask, <8 x float> %a2) {
|
2017-03-03 17:03:24 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_maskstore_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
|
|
|
|
; CHECK-NEXT: vmaskmovps %ymm1, %ymm0, (%eax) # encoding: [0xc4,0xe2,0x7d,0x2e,0x08]
|
|
|
|
; CHECK-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2015-10-20 19:20:13 +08:00
|
|
|
call void @llvm.x86.avx.maskstore.ps.256(i8* %a0, <8 x i32> %mask, <8 x float> %a2)
|
2010-08-12 05:12:09 +08:00
|
|
|
ret void
|
|
|
|
}
|
2015-10-20 19:20:13 +08:00
|
|
|
declare void @llvm.x86.avx.maskstore.ps.256(i8*, <8 x i32>, <8 x float>) nounwind
|
2010-08-12 05:12:09 +08:00
|
|
|
|
|
|
|
|
|
|
|
define <4 x double> @test_x86_avx_max_pd_256(<4 x double> %a0, <4 x double> %a1) {
|
2016-05-20 13:10:32 +08:00
|
|
|
; AVX-LABEL: test_x86_avx_max_pd_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX: # BB#0:
|
|
|
|
; AVX-NEXT: vmaxpd %ymm1, %ymm0, %ymm0 # encoding: [0xc5,0xfd,0x5f,0xc1]
|
|
|
|
; AVX-NEXT: retl # encoding: [0xc3]
|
2016-05-20 13:10:32 +08:00
|
|
|
;
|
|
|
|
; AVX512VL-LABEL: test_x86_avx_max_pd_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX512VL: # BB#0:
|
|
|
|
; AVX512VL-NEXT: vmaxpd %ymm1, %ymm0, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfd,0x5f,0xc1]
|
|
|
|
; AVX512VL-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <4 x double> @llvm.x86.avx.max.pd.256(<4 x double> %a0, <4 x double> %a1) ; <<4 x double>> [#uses=1]
|
|
|
|
ret <4 x double> %res
|
|
|
|
}
|
|
|
|
declare <4 x double> @llvm.x86.avx.max.pd.256(<4 x double>, <4 x double>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <8 x float> @test_x86_avx_max_ps_256(<8 x float> %a0, <8 x float> %a1) {
|
2016-05-20 13:10:32 +08:00
|
|
|
; AVX-LABEL: test_x86_avx_max_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX: # BB#0:
|
|
|
|
; AVX-NEXT: vmaxps %ymm1, %ymm0, %ymm0 # encoding: [0xc5,0xfc,0x5f,0xc1]
|
|
|
|
; AVX-NEXT: retl # encoding: [0xc3]
|
2016-05-20 13:10:32 +08:00
|
|
|
;
|
|
|
|
; AVX512VL-LABEL: test_x86_avx_max_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX512VL: # BB#0:
|
|
|
|
; AVX512VL-NEXT: vmaxps %ymm1, %ymm0, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfc,0x5f,0xc1]
|
|
|
|
; AVX512VL-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.avx.max.ps.256(<8 x float> %a0, <8 x float> %a1) ; <<8 x float>> [#uses=1]
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
declare <8 x float> @llvm.x86.avx.max.ps.256(<8 x float>, <8 x float>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <4 x double> @test_x86_avx_min_pd_256(<4 x double> %a0, <4 x double> %a1) {
|
2016-05-20 13:10:32 +08:00
|
|
|
; AVX-LABEL: test_x86_avx_min_pd_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX: # BB#0:
|
|
|
|
; AVX-NEXT: vminpd %ymm1, %ymm0, %ymm0 # encoding: [0xc5,0xfd,0x5d,0xc1]
|
|
|
|
; AVX-NEXT: retl # encoding: [0xc3]
|
2016-05-20 13:10:32 +08:00
|
|
|
;
|
|
|
|
; AVX512VL-LABEL: test_x86_avx_min_pd_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX512VL: # BB#0:
|
|
|
|
; AVX512VL-NEXT: vminpd %ymm1, %ymm0, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfd,0x5d,0xc1]
|
|
|
|
; AVX512VL-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <4 x double> @llvm.x86.avx.min.pd.256(<4 x double> %a0, <4 x double> %a1) ; <<4 x double>> [#uses=1]
|
|
|
|
ret <4 x double> %res
|
|
|
|
}
|
|
|
|
declare <4 x double> @llvm.x86.avx.min.pd.256(<4 x double>, <4 x double>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <8 x float> @test_x86_avx_min_ps_256(<8 x float> %a0, <8 x float> %a1) {
|
2016-05-20 13:10:32 +08:00
|
|
|
; AVX-LABEL: test_x86_avx_min_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX: # BB#0:
|
|
|
|
; AVX-NEXT: vminps %ymm1, %ymm0, %ymm0 # encoding: [0xc5,0xfc,0x5d,0xc1]
|
|
|
|
; AVX-NEXT: retl # encoding: [0xc3]
|
2016-05-20 13:10:32 +08:00
|
|
|
;
|
|
|
|
; AVX512VL-LABEL: test_x86_avx_min_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX512VL: # BB#0:
|
|
|
|
; AVX512VL-NEXT: vminps %ymm1, %ymm0, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfc,0x5d,0xc1]
|
|
|
|
; AVX512VL-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.avx.min.ps.256(<8 x float> %a0, <8 x float> %a1) ; <<8 x float>> [#uses=1]
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
declare <8 x float> @llvm.x86.avx.min.ps.256(<8 x float>, <8 x float>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define i32 @test_x86_avx_movmsk_pd_256(<4 x double> %a0) {
|
2017-03-03 17:03:24 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_movmsk_pd_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: vmovmskpd %ymm0, %eax # encoding: [0xc5,0xfd,0x50,0xc0]
|
|
|
|
; CHECK-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call i32 @llvm.x86.avx.movmsk.pd.256(<4 x double> %a0) ; <i32> [#uses=1]
|
|
|
|
ret i32 %res
|
|
|
|
}
|
|
|
|
declare i32 @llvm.x86.avx.movmsk.pd.256(<4 x double>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define i32 @test_x86_avx_movmsk_ps_256(<8 x float> %a0) {
|
2017-03-03 17:03:24 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_movmsk_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: vmovmskps %ymm0, %eax # encoding: [0xc5,0xfc,0x50,0xc0]
|
|
|
|
; CHECK-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call i32 @llvm.x86.avx.movmsk.ps.256(<8 x float> %a0) ; <i32> [#uses=1]
|
|
|
|
ret i32 %res
|
|
|
|
}
|
|
|
|
declare i32 @llvm.x86.avx.movmsk.ps.256(<8 x float>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
define i32 @test_x86_avx_ptestc_256(<4 x i64> %a0, <4 x i64> %a1) {
|
2017-03-03 17:03:24 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_ptestc_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: xorl %eax, %eax # encoding: [0x31,0xc0]
|
|
|
|
; CHECK-NEXT: vptest %ymm1, %ymm0 # encoding: [0xc4,0xe2,0x7d,0x17,0xc1]
|
|
|
|
; CHECK-NEXT: setb %al # encoding: [0x0f,0x92,0xc0]
|
|
|
|
; CHECK-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call i32 @llvm.x86.avx.ptestc.256(<4 x i64> %a0, <4 x i64> %a1) ; <i32> [#uses=1]
|
|
|
|
ret i32 %res
|
|
|
|
}
|
|
|
|
declare i32 @llvm.x86.avx.ptestc.256(<4 x i64>, <4 x i64>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define i32 @test_x86_avx_ptestnzc_256(<4 x i64> %a0, <4 x i64> %a1) {
|
2017-03-03 17:03:24 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_ptestnzc_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: xorl %eax, %eax # encoding: [0x31,0xc0]
|
|
|
|
; CHECK-NEXT: vptest %ymm1, %ymm0 # encoding: [0xc4,0xe2,0x7d,0x17,0xc1]
|
|
|
|
; CHECK-NEXT: seta %al # encoding: [0x0f,0x97,0xc0]
|
|
|
|
; CHECK-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call i32 @llvm.x86.avx.ptestnzc.256(<4 x i64> %a0, <4 x i64> %a1) ; <i32> [#uses=1]
|
|
|
|
ret i32 %res
|
|
|
|
}
|
|
|
|
declare i32 @llvm.x86.avx.ptestnzc.256(<4 x i64>, <4 x i64>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define i32 @test_x86_avx_ptestz_256(<4 x i64> %a0, <4 x i64> %a1) {
|
2017-03-03 17:03:24 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_ptestz_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: xorl %eax, %eax # encoding: [0x31,0xc0]
|
|
|
|
; CHECK-NEXT: vptest %ymm1, %ymm0 # encoding: [0xc4,0xe2,0x7d,0x17,0xc1]
|
|
|
|
; CHECK-NEXT: sete %al # encoding: [0x0f,0x94,0xc0]
|
|
|
|
; CHECK-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call i32 @llvm.x86.avx.ptestz.256(<4 x i64> %a0, <4 x i64> %a1) ; <i32> [#uses=1]
|
|
|
|
ret i32 %res
|
|
|
|
}
|
|
|
|
declare i32 @llvm.x86.avx.ptestz.256(<4 x i64>, <4 x i64>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <8 x float> @test_x86_avx_rcp_ps_256(<8 x float> %a0) {
|
2016-05-20 13:10:32 +08:00
|
|
|
; AVX-LABEL: test_x86_avx_rcp_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX: # BB#0:
|
|
|
|
; AVX-NEXT: vrcpps %ymm0, %ymm0 # encoding: [0xc5,0xfc,0x53,0xc0]
|
|
|
|
; AVX-NEXT: retl # encoding: [0xc3]
|
2016-05-20 13:10:32 +08:00
|
|
|
;
|
|
|
|
; AVX512VL-LABEL: test_x86_avx_rcp_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX512VL: # BB#0:
|
|
|
|
; AVX512VL-NEXT: vrcp14ps %ymm0, %ymm0 # encoding: [0x62,0xf2,0x7d,0x28,0x4c,0xc0]
|
|
|
|
; AVX512VL-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.avx.rcp.ps.256(<8 x float> %a0) ; <<8 x float>> [#uses=1]
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
declare <8 x float> @llvm.x86.avx.rcp.ps.256(<8 x float>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <4 x double> @test_x86_avx_round_pd_256(<4 x double> %a0) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_round_pd_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: vroundpd $7, %ymm0, %ymm0 # encoding: [0xc4,0xe3,0x7d,0x09,0xc0,0x07]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <4 x double> @llvm.x86.avx.round.pd.256(<4 x double> %a0, i32 7) ; <<4 x double>> [#uses=1]
|
|
|
|
ret <4 x double> %res
|
|
|
|
}
|
|
|
|
declare <4 x double> @llvm.x86.avx.round.pd.256(<4 x double>, i32) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <8 x float> @test_x86_avx_round_ps_256(<8 x float> %a0) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_round_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: vroundps $7, %ymm0, %ymm0 # encoding: [0xc4,0xe3,0x7d,0x08,0xc0,0x07]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.avx.round.ps.256(<8 x float> %a0, i32 7) ; <<8 x float>> [#uses=1]
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
declare <8 x float> @llvm.x86.avx.round.ps.256(<8 x float>, i32) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <8 x float> @test_x86_avx_rsqrt_ps_256(<8 x float> %a0) {
|
2016-05-20 13:10:32 +08:00
|
|
|
; AVX-LABEL: test_x86_avx_rsqrt_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX: # BB#0:
|
|
|
|
; AVX-NEXT: vrsqrtps %ymm0, %ymm0 # encoding: [0xc5,0xfc,0x52,0xc0]
|
|
|
|
; AVX-NEXT: retl # encoding: [0xc3]
|
2016-05-20 13:10:32 +08:00
|
|
|
;
|
|
|
|
; AVX512VL-LABEL: test_x86_avx_rsqrt_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX512VL: # BB#0:
|
|
|
|
; AVX512VL-NEXT: vrsqrt14ps %ymm0, %ymm0 # encoding: [0x62,0xf2,0x7d,0x28,0x4e,0xc0]
|
|
|
|
; AVX512VL-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.avx.rsqrt.ps.256(<8 x float> %a0) ; <<8 x float>> [#uses=1]
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
declare <8 x float> @llvm.x86.avx.rsqrt.ps.256(<8 x float>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <4 x double> @test_x86_avx_sqrt_pd_256(<4 x double> %a0) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_sqrt_pd_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: vsqrtpd %ymm0, %ymm0 # encoding: [0xc5,0xfd,0x51,0xc0]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <4 x double> @llvm.x86.avx.sqrt.pd.256(<4 x double> %a0) ; <<4 x double>> [#uses=1]
|
|
|
|
ret <4 x double> %res
|
|
|
|
}
|
|
|
|
declare <4 x double> @llvm.x86.avx.sqrt.pd.256(<4 x double>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <8 x float> @test_x86_avx_sqrt_ps_256(<8 x float> %a0) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_sqrt_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: vsqrtps %ymm0, %ymm0 # encoding: [0xc5,0xfc,0x51,0xc0]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.avx.sqrt.ps.256(<8 x float> %a0) ; <<8 x float>> [#uses=1]
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
declare <8 x float> @llvm.x86.avx.sqrt.ps.256(<8 x float>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <2 x double> @test_x86_avx_vpermilvar_pd(<2 x double> %a0, <2 x i64> %a1) {
|
2016-05-20 13:10:32 +08:00
|
|
|
; AVX-LABEL: test_x86_avx_vpermilvar_pd:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX: # BB#0:
|
|
|
|
; AVX-NEXT: vpermilpd %xmm1, %xmm0, %xmm0 # encoding: [0xc4,0xe2,0x79,0x0d,0xc1]
|
|
|
|
; AVX-NEXT: retl # encoding: [0xc3]
|
2016-05-20 13:10:32 +08:00
|
|
|
;
|
|
|
|
; AVX512VL-LABEL: test_x86_avx_vpermilvar_pd:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX512VL: # BB#0:
|
|
|
|
; AVX512VL-NEXT: vpermilpd %xmm1, %xmm0, %xmm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x0d,0xc1]
|
|
|
|
; AVX512VL-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <2 x double> @llvm.x86.avx.vpermilvar.pd(<2 x double> %a0, <2 x i64> %a1) ; <<2 x double>> [#uses=1]
|
|
|
|
ret <2 x double> %res
|
|
|
|
}
|
|
|
|
declare <2 x double> @llvm.x86.avx.vpermilvar.pd(<2 x double>, <2 x i64>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <4 x double> @test_x86_avx_vpermilvar_pd_256(<4 x double> %a0, <4 x i64> %a1) {
|
2016-05-20 13:10:32 +08:00
|
|
|
; AVX-LABEL: test_x86_avx_vpermilvar_pd_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX: # BB#0:
|
|
|
|
; AVX-NEXT: vpermilpd %ymm1, %ymm0, %ymm0 # encoding: [0xc4,0xe2,0x7d,0x0d,0xc1]
|
|
|
|
; AVX-NEXT: retl # encoding: [0xc3]
|
2016-05-20 13:10:32 +08:00
|
|
|
;
|
|
|
|
; AVX512VL-LABEL: test_x86_avx_vpermilvar_pd_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX512VL: # BB#0:
|
|
|
|
; AVX512VL-NEXT: vpermilpd %ymm1, %ymm0, %ymm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x0d,0xc1]
|
|
|
|
; AVX512VL-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <4 x double> @llvm.x86.avx.vpermilvar.pd.256(<4 x double> %a0, <4 x i64> %a1) ; <<4 x double>> [#uses=1]
|
|
|
|
ret <4 x double> %res
|
|
|
|
}
|
|
|
|
declare <4 x double> @llvm.x86.avx.vpermilvar.pd.256(<4 x double>, <4 x i64>) nounwind readnone
|
|
|
|
|
2015-12-26 12:58:05 +08:00
|
|
|
define <4 x double> @test_x86_avx_vpermilvar_pd_256_2(<4 x double> %a0) {
|
2016-05-20 13:10:32 +08:00
|
|
|
; AVX-LABEL: test_x86_avx_vpermilvar_pd_256_2:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX: # BB#0:
|
|
|
|
; AVX-NEXT: vpermilpd $9, %ymm0, %ymm0 # encoding: [0xc4,0xe3,0x7d,0x05,0xc0,0x09]
|
|
|
|
; AVX-NEXT: # ymm0 = ymm0[1,0,2,3]
|
|
|
|
; AVX-NEXT: retl # encoding: [0xc3]
|
2016-05-20 13:10:32 +08:00
|
|
|
;
|
|
|
|
; AVX512VL-LABEL: test_x86_avx_vpermilvar_pd_256_2:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX512VL: # BB#0:
|
|
|
|
; AVX512VL-NEXT: vpermilpd $9, %ymm0, %ymm0 # EVEX TO VEX Compression encoding: [0xc4,0xe3,0x7d,0x05,0xc0,0x09]
|
|
|
|
; AVX512VL-NEXT: # ymm0 = ymm0[1,0,2,3]
|
|
|
|
; AVX512VL-NEXT: retl # encoding: [0xc3]
|
2015-12-26 12:58:05 +08:00
|
|
|
%res = call <4 x double> @llvm.x86.avx.vpermilvar.pd.256(<4 x double> %a0, <4 x i64> <i64 2, i64 0, i64 0, i64 2>) ; <<4 x double>> [#uses=1]
|
|
|
|
ret <4 x double> %res
|
|
|
|
}
|
2010-08-12 05:12:09 +08:00
|
|
|
|
|
|
|
define <4 x float> @test_x86_avx_vpermilvar_ps(<4 x float> %a0, <4 x i32> %a1) {
|
2016-05-20 13:10:32 +08:00
|
|
|
; AVX-LABEL: test_x86_avx_vpermilvar_ps:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX: # BB#0:
|
|
|
|
; AVX-NEXT: vpermilps %xmm1, %xmm0, %xmm0 # encoding: [0xc4,0xe2,0x79,0x0c,0xc1]
|
|
|
|
; AVX-NEXT: retl # encoding: [0xc3]
|
2016-05-20 13:10:32 +08:00
|
|
|
;
|
|
|
|
; AVX512VL-LABEL: test_x86_avx_vpermilvar_ps:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX512VL: # BB#0:
|
|
|
|
; AVX512VL-NEXT: vpermilps %xmm1, %xmm0, %xmm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x0c,0xc1]
|
|
|
|
; AVX512VL-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.avx.vpermilvar.ps(<4 x float> %a0, <4 x i32> %a1) ; <<4 x float>> [#uses=1]
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
2011-12-06 17:04:59 +08:00
|
|
|
define <4 x float> @test_x86_avx_vpermilvar_ps_load(<4 x float> %a0, <4 x i32>* %a1) {
|
2016-05-20 13:10:32 +08:00
|
|
|
; AVX-LABEL: test_x86_avx_vpermilvar_ps_load:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX: # BB#0:
|
|
|
|
; AVX-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
|
|
|
|
; AVX-NEXT: vpermilps (%eax), %xmm0, %xmm0 # encoding: [0xc4,0xe2,0x79,0x0c,0x00]
|
|
|
|
; AVX-NEXT: retl # encoding: [0xc3]
|
2016-05-20 13:10:32 +08:00
|
|
|
;
|
|
|
|
; AVX512VL-LABEL: test_x86_avx_vpermilvar_ps_load:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX512VL: # BB#0:
|
|
|
|
; AVX512VL-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
|
|
|
|
; AVX512VL-NEXT: vpermilps (%eax), %xmm0, %xmm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x79,0x0c,0x00]
|
|
|
|
; AVX512VL-NEXT: retl # encoding: [0xc3]
|
2015-02-28 05:17:42 +08:00
|
|
|
%a2 = load <4 x i32>, <4 x i32>* %a1
|
2011-12-06 17:04:59 +08:00
|
|
|
%res = call <4 x float> @llvm.x86.avx.vpermilvar.ps(<4 x float> %a0, <4 x i32> %a2) ; <<4 x float>> [#uses=1]
|
|
|
|
ret <4 x float> %res
|
|
|
|
}
|
2010-08-12 05:12:09 +08:00
|
|
|
declare <4 x float> @llvm.x86.avx.vpermilvar.ps(<4 x float>, <4 x i32>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define <8 x float> @test_x86_avx_vpermilvar_ps_256(<8 x float> %a0, <8 x i32> %a1) {
|
2016-05-20 13:10:32 +08:00
|
|
|
; AVX-LABEL: test_x86_avx_vpermilvar_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX: # BB#0:
|
|
|
|
; AVX-NEXT: vpermilps %ymm1, %ymm0, %ymm0 # encoding: [0xc4,0xe2,0x7d,0x0c,0xc1]
|
|
|
|
; AVX-NEXT: retl # encoding: [0xc3]
|
2016-05-20 13:10:32 +08:00
|
|
|
;
|
|
|
|
; AVX512VL-LABEL: test_x86_avx_vpermilvar_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX512VL: # BB#0:
|
|
|
|
; AVX512VL-NEXT: vpermilps %ymm1, %ymm0, %ymm0 # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x7d,0x0c,0xc1]
|
|
|
|
; AVX512VL-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call <8 x float> @llvm.x86.avx.vpermilvar.ps.256(<8 x float> %a0, <8 x i32> %a1) ; <<8 x float>> [#uses=1]
|
|
|
|
ret <8 x float> %res
|
|
|
|
}
|
|
|
|
declare <8 x float> @llvm.x86.avx.vpermilvar.ps.256(<8 x float>, <8 x i32>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define i32 @test_x86_avx_vtestc_pd(<2 x double> %a0, <2 x double> %a1) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_vtestc_pd:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: xorl %eax, %eax # encoding: [0x31,0xc0]
|
|
|
|
; CHECK-NEXT: vtestpd %xmm1, %xmm0 # encoding: [0xc4,0xe2,0x79,0x0f,0xc1]
|
|
|
|
; CHECK-NEXT: setb %al # encoding: [0x0f,0x92,0xc0]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call i32 @llvm.x86.avx.vtestc.pd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
|
|
|
|
ret i32 %res
|
|
|
|
}
|
|
|
|
declare i32 @llvm.x86.avx.vtestc.pd(<2 x double>, <2 x double>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define i32 @test_x86_avx_vtestc_pd_256(<4 x double> %a0, <4 x double> %a1) {
|
2017-03-03 17:03:24 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_vtestc_pd_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: xorl %eax, %eax # encoding: [0x31,0xc0]
|
|
|
|
; CHECK-NEXT: vtestpd %ymm1, %ymm0 # encoding: [0xc4,0xe2,0x7d,0x0f,0xc1]
|
|
|
|
; CHECK-NEXT: setb %al # encoding: [0x0f,0x92,0xc0]
|
|
|
|
; CHECK-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call i32 @llvm.x86.avx.vtestc.pd.256(<4 x double> %a0, <4 x double> %a1) ; <i32> [#uses=1]
|
|
|
|
ret i32 %res
|
|
|
|
}
|
|
|
|
declare i32 @llvm.x86.avx.vtestc.pd.256(<4 x double>, <4 x double>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define i32 @test_x86_avx_vtestc_ps(<4 x float> %a0, <4 x float> %a1) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_vtestc_ps:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: xorl %eax, %eax # encoding: [0x31,0xc0]
|
|
|
|
; CHECK-NEXT: vtestps %xmm1, %xmm0 # encoding: [0xc4,0xe2,0x79,0x0e,0xc1]
|
|
|
|
; CHECK-NEXT: setb %al # encoding: [0x0f,0x92,0xc0]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call i32 @llvm.x86.avx.vtestc.ps(<4 x float> %a0, <4 x float> %a1) ; <i32> [#uses=1]
|
|
|
|
ret i32 %res
|
|
|
|
}
|
|
|
|
declare i32 @llvm.x86.avx.vtestc.ps(<4 x float>, <4 x float>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define i32 @test_x86_avx_vtestc_ps_256(<8 x float> %a0, <8 x float> %a1) {
|
2017-03-03 17:03:24 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_vtestc_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: xorl %eax, %eax # encoding: [0x31,0xc0]
|
|
|
|
; CHECK-NEXT: vtestps %ymm1, %ymm0 # encoding: [0xc4,0xe2,0x7d,0x0e,0xc1]
|
|
|
|
; CHECK-NEXT: setb %al # encoding: [0x0f,0x92,0xc0]
|
|
|
|
; CHECK-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call i32 @llvm.x86.avx.vtestc.ps.256(<8 x float> %a0, <8 x float> %a1) ; <i32> [#uses=1]
|
|
|
|
ret i32 %res
|
|
|
|
}
|
|
|
|
declare i32 @llvm.x86.avx.vtestc.ps.256(<8 x float>, <8 x float>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define i32 @test_x86_avx_vtestnzc_pd(<2 x double> %a0, <2 x double> %a1) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_vtestnzc_pd:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: xorl %eax, %eax # encoding: [0x31,0xc0]
|
|
|
|
; CHECK-NEXT: vtestpd %xmm1, %xmm0 # encoding: [0xc4,0xe2,0x79,0x0f,0xc1]
|
|
|
|
; CHECK-NEXT: seta %al # encoding: [0x0f,0x97,0xc0]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call i32 @llvm.x86.avx.vtestnzc.pd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
|
|
|
|
ret i32 %res
|
|
|
|
}
|
|
|
|
declare i32 @llvm.x86.avx.vtestnzc.pd(<2 x double>, <2 x double>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define i32 @test_x86_avx_vtestnzc_pd_256(<4 x double> %a0, <4 x double> %a1) {
|
2017-03-03 17:03:24 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_vtestnzc_pd_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: xorl %eax, %eax # encoding: [0x31,0xc0]
|
|
|
|
; CHECK-NEXT: vtestpd %ymm1, %ymm0 # encoding: [0xc4,0xe2,0x7d,0x0f,0xc1]
|
|
|
|
; CHECK-NEXT: seta %al # encoding: [0x0f,0x97,0xc0]
|
|
|
|
; CHECK-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call i32 @llvm.x86.avx.vtestnzc.pd.256(<4 x double> %a0, <4 x double> %a1) ; <i32> [#uses=1]
|
|
|
|
ret i32 %res
|
|
|
|
}
|
|
|
|
declare i32 @llvm.x86.avx.vtestnzc.pd.256(<4 x double>, <4 x double>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define i32 @test_x86_avx_vtestnzc_ps(<4 x float> %a0, <4 x float> %a1) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_vtestnzc_ps:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: xorl %eax, %eax # encoding: [0x31,0xc0]
|
|
|
|
; CHECK-NEXT: vtestps %xmm1, %xmm0 # encoding: [0xc4,0xe2,0x79,0x0e,0xc1]
|
|
|
|
; CHECK-NEXT: seta %al # encoding: [0x0f,0x97,0xc0]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call i32 @llvm.x86.avx.vtestnzc.ps(<4 x float> %a0, <4 x float> %a1) ; <i32> [#uses=1]
|
|
|
|
ret i32 %res
|
|
|
|
}
|
|
|
|
declare i32 @llvm.x86.avx.vtestnzc.ps(<4 x float>, <4 x float>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define i32 @test_x86_avx_vtestnzc_ps_256(<8 x float> %a0, <8 x float> %a1) {
|
2017-03-03 17:03:24 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_vtestnzc_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: xorl %eax, %eax # encoding: [0x31,0xc0]
|
|
|
|
; CHECK-NEXT: vtestps %ymm1, %ymm0 # encoding: [0xc4,0xe2,0x7d,0x0e,0xc1]
|
|
|
|
; CHECK-NEXT: seta %al # encoding: [0x0f,0x97,0xc0]
|
|
|
|
; CHECK-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call i32 @llvm.x86.avx.vtestnzc.ps.256(<8 x float> %a0, <8 x float> %a1) ; <i32> [#uses=1]
|
|
|
|
ret i32 %res
|
|
|
|
}
|
|
|
|
declare i32 @llvm.x86.avx.vtestnzc.ps.256(<8 x float>, <8 x float>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define i32 @test_x86_avx_vtestz_pd(<2 x double> %a0, <2 x double> %a1) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_vtestz_pd:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: xorl %eax, %eax # encoding: [0x31,0xc0]
|
|
|
|
; CHECK-NEXT: vtestpd %xmm1, %xmm0 # encoding: [0xc4,0xe2,0x79,0x0f,0xc1]
|
|
|
|
; CHECK-NEXT: sete %al # encoding: [0x0f,0x94,0xc0]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call i32 @llvm.x86.avx.vtestz.pd(<2 x double> %a0, <2 x double> %a1) ; <i32> [#uses=1]
|
|
|
|
ret i32 %res
|
|
|
|
}
|
|
|
|
declare i32 @llvm.x86.avx.vtestz.pd(<2 x double>, <2 x double>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define i32 @test_x86_avx_vtestz_pd_256(<4 x double> %a0, <4 x double> %a1) {
|
2017-03-03 17:03:24 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_vtestz_pd_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: xorl %eax, %eax # encoding: [0x31,0xc0]
|
|
|
|
; CHECK-NEXT: vtestpd %ymm1, %ymm0 # encoding: [0xc4,0xe2,0x7d,0x0f,0xc1]
|
|
|
|
; CHECK-NEXT: sete %al # encoding: [0x0f,0x94,0xc0]
|
|
|
|
; CHECK-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call i32 @llvm.x86.avx.vtestz.pd.256(<4 x double> %a0, <4 x double> %a1) ; <i32> [#uses=1]
|
|
|
|
ret i32 %res
|
|
|
|
}
|
|
|
|
declare i32 @llvm.x86.avx.vtestz.pd.256(<4 x double>, <4 x double>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define i32 @test_x86_avx_vtestz_ps(<4 x float> %a0, <4 x float> %a1) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_vtestz_ps:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: xorl %eax, %eax # encoding: [0x31,0xc0]
|
|
|
|
; CHECK-NEXT: vtestps %xmm1, %xmm0 # encoding: [0xc4,0xe2,0x79,0x0e,0xc1]
|
|
|
|
; CHECK-NEXT: sete %al # encoding: [0x0f,0x94,0xc0]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call i32 @llvm.x86.avx.vtestz.ps(<4 x float> %a0, <4 x float> %a1) ; <i32> [#uses=1]
|
|
|
|
ret i32 %res
|
|
|
|
}
|
|
|
|
declare i32 @llvm.x86.avx.vtestz.ps(<4 x float>, <4 x float>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define i32 @test_x86_avx_vtestz_ps_256(<8 x float> %a0, <8 x float> %a1) {
|
2017-03-03 17:03:24 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_vtestz_ps_256:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: xorl %eax, %eax # encoding: [0x31,0xc0]
|
|
|
|
; CHECK-NEXT: vtestps %ymm1, %ymm0 # encoding: [0xc4,0xe2,0x7d,0x0e,0xc1]
|
|
|
|
; CHECK-NEXT: sete %al # encoding: [0x0f,0x94,0xc0]
|
|
|
|
; CHECK-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
%res = call i32 @llvm.x86.avx.vtestz.ps.256(<8 x float> %a0, <8 x float> %a1) ; <i32> [#uses=1]
|
|
|
|
ret i32 %res
|
|
|
|
}
|
|
|
|
declare i32 @llvm.x86.avx.vtestz.ps.256(<8 x float>, <8 x float>) nounwind readnone
|
|
|
|
|
|
|
|
|
|
|
|
define void @test_x86_avx_vzeroall() {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_vzeroall:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: vzeroall # encoding: [0xc5,0xfc,0x77]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
call void @llvm.x86.avx.vzeroall()
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
declare void @llvm.x86.avx.vzeroall() nounwind
|
|
|
|
|
|
|
|
|
|
|
|
define void @test_x86_avx_vzeroupper() {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_avx_vzeroupper:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2010-08-12 05:12:09 +08:00
|
|
|
call void @llvm.x86.avx.vzeroupper()
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
declare void @llvm.x86.avx.vzeroupper() nounwind
|
|
|
|
|
2015-03-19 00:07:10 +08:00
|
|
|
define void @movnt_dq(i8* %p, <2 x i64> %a1) nounwind {
|
2016-05-20 13:10:32 +08:00
|
|
|
; AVX-LABEL: movnt_dq:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX: # BB#0:
|
|
|
|
; AVX-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
|
|
|
|
; AVX-NEXT: vpcmpeqd %xmm1, %xmm1, %xmm1 # encoding: [0xc5,0xf1,0x76,0xc9]
|
|
|
|
; AVX-NEXT: vpsubq %xmm1, %xmm0, %xmm0 # encoding: [0xc5,0xf9,0xfb,0xc1]
|
|
|
|
; AVX-NEXT: vmovntdq %ymm0, (%eax) # encoding: [0xc5,0xfd,0xe7,0x00]
|
|
|
|
; AVX-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; AVX-NEXT: retl # encoding: [0xc3]
|
2016-05-20 13:10:32 +08:00
|
|
|
;
|
|
|
|
; AVX512VL-LABEL: movnt_dq:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX512VL: # BB#0:
|
|
|
|
; AVX512VL-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
|
|
|
|
; AVX512VL-NEXT: vpcmpeqd %xmm1, %xmm1, %xmm1 # encoding: [0xc5,0xf1,0x76,0xc9]
|
|
|
|
; AVX512VL-NEXT: vpsubq %xmm1, %xmm0, %xmm0 # EVEX TO VEX Compression encoding: [0xc5,0xf9,0xfb,0xc1]
|
|
|
|
; AVX512VL-NEXT: vmovntdq %ymm0, (%eax) # EVEX TO VEX Compression encoding: [0xc5,0xfd,0xe7,0x00]
|
|
|
|
; AVX512VL-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; AVX512VL-NEXT: retl # encoding: [0xc3]
|
2015-03-19 00:07:10 +08:00
|
|
|
%a2 = add <2 x i64> %a1, <i64 1, i64 1>
|
|
|
|
%a3 = shufflevector <2 x i64> %a2, <2 x i64> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
|
|
|
|
tail call void @llvm.x86.avx.movnt.dq.256(i8* %p, <4 x i64> %a3) nounwind
|
2012-05-08 14:58:15 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
declare void @llvm.x86.avx.movnt.dq.256(i8*, <4 x i64>) nounwind
|
|
|
|
|
|
|
|
define void @movnt_ps(i8* %p, <8 x float> %a) nounwind {
|
2016-05-20 13:10:32 +08:00
|
|
|
; AVX-LABEL: movnt_ps:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX: # BB#0:
|
|
|
|
; AVX-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
|
|
|
|
; AVX-NEXT: vmovntps %ymm0, (%eax) # encoding: [0xc5,0xfc,0x2b,0x00]
|
|
|
|
; AVX-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; AVX-NEXT: retl # encoding: [0xc3]
|
2016-05-20 13:10:32 +08:00
|
|
|
;
|
|
|
|
; AVX512VL-LABEL: movnt_ps:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX512VL: # BB#0:
|
|
|
|
; AVX512VL-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
|
|
|
|
; AVX512VL-NEXT: vmovntps %ymm0, (%eax) # EVEX TO VEX Compression encoding: [0xc5,0xfc,0x2b,0x00]
|
|
|
|
; AVX512VL-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; AVX512VL-NEXT: retl # encoding: [0xc3]
|
2012-05-08 14:58:15 +08:00
|
|
|
tail call void @llvm.x86.avx.movnt.ps.256(i8* %p, <8 x float> %a) nounwind
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
declare void @llvm.x86.avx.movnt.ps.256(i8*, <8 x float>) nounwind
|
|
|
|
|
|
|
|
define void @movnt_pd(i8* %p, <4 x double> %a1) nounwind {
|
|
|
|
; add operation forces the execution domain.
|
2016-05-20 13:10:32 +08:00
|
|
|
; AVX-LABEL: movnt_pd:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX: # BB#0:
|
|
|
|
; AVX-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
|
2017-07-28 01:47:01 +08:00
|
|
|
; AVX-NEXT: vxorpd %xmm1, %xmm1, %xmm1 # encoding: [0xc5,0xf1,0x57,0xc9]
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX-NEXT: vaddpd %ymm1, %ymm0, %ymm0 # encoding: [0xc5,0xfd,0x58,0xc1]
|
|
|
|
; AVX-NEXT: vmovntpd %ymm0, (%eax) # encoding: [0xc5,0xfd,0x2b,0x00]
|
|
|
|
; AVX-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; AVX-NEXT: retl # encoding: [0xc3]
|
2016-05-20 13:10:32 +08:00
|
|
|
;
|
|
|
|
; AVX512VL-LABEL: movnt_pd:
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX512VL: # BB#0:
|
|
|
|
; AVX512VL-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
|
2017-08-03 16:50:18 +08:00
|
|
|
; AVX512VL-NEXT: vxorpd %xmm1, %xmm1, %xmm1 # EVEX TO VEX Compression encoding: [0xc5,0xf1,0x57,0xc9]
|
2017-07-26 18:54:51 +08:00
|
|
|
; AVX512VL-NEXT: vaddpd %ymm1, %ymm0, %ymm0 # EVEX TO VEX Compression encoding: [0xc5,0xfd,0x58,0xc1]
|
|
|
|
; AVX512VL-NEXT: vmovntpd %ymm0, (%eax) # EVEX TO VEX Compression encoding: [0xc5,0xfd,0x2b,0x00]
|
|
|
|
; AVX512VL-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
|
|
|
|
; AVX512VL-NEXT: retl # encoding: [0xc3]
|
2012-05-08 14:58:15 +08:00
|
|
|
%a2 = fadd <4 x double> %a1, <double 0x0, double 0x0, double 0x0, double 0x0>
|
|
|
|
tail call void @llvm.x86.avx.movnt.pd.256(i8* %p, <4 x double> %a2) nounwind
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
declare void @llvm.x86.avx.movnt.pd.256(i8*, <4 x double>) nounwind
|
2012-05-31 12:37:40 +08:00
|
|
|
|
|
|
|
|
|
|
|
; Check for pclmulqdq
|
|
|
|
define <2 x i64> @test_x86_pclmulqdq(<2 x i64> %a0, <2 x i64> %a1) {
|
2016-11-06 10:03:58 +08:00
|
|
|
; CHECK-LABEL: test_x86_pclmulqdq:
|
2017-07-26 18:54:51 +08:00
|
|
|
; CHECK: # BB#0:
|
|
|
|
; CHECK-NEXT: vpclmulqdq $0, %xmm1, %xmm0, %xmm0 # encoding: [0xc4,0xe3,0x79,0x44,0xc1,0x00]
|
|
|
|
; CHECK-NEXT: retl # encoding: [0xc3]
|
2012-05-31 12:37:40 +08:00
|
|
|
%res = call <2 x i64> @llvm.x86.pclmulqdq(<2 x i64> %a0, <2 x i64> %a1, i8 0) ; <<2 x i64>> [#uses=1]
|
|
|
|
ret <2 x i64> %res
|
|
|
|
}
|
|
|
|
declare <2 x i64> @llvm.x86.pclmulqdq(<2 x i64>, <2 x i64>, i8) nounwind readnone
|