2017-04-20 04:39:39 +08:00
|
|
|
; RUN: llc -mtriple=arm-eabi -mattr=+neon %s -o - -verify-machineinstrs | FileCheck %s
|
2009-08-13 04:51:55 +08:00
|
|
|
|
2009-10-07 05:16:19 +08:00
|
|
|
%struct.__neon_int8x8x2_t = type { <8 x i8>, <8 x i8> }
|
|
|
|
%struct.__neon_int8x8x3_t = type { <8 x i8>, <8 x i8>, <8 x i8> }
|
|
|
|
%struct.__neon_int8x8x4_t = type { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> }
|
2009-08-13 04:51:55 +08:00
|
|
|
|
|
|
|
define <8 x i8> @vtbl1(<8 x i8>* %A, <8 x i8>* %B) nounwind {
|
2013-07-14 14:24:09 +08:00
|
|
|
;CHECK-LABEL: vtbl1:
|
2009-08-13 04:51:55 +08:00
|
|
|
;CHECK: vtbl.8
|
2015-02-28 05:17:42 +08:00
|
|
|
%tmp1 = load <8 x i8>, <8 x i8>* %A
|
|
|
|
%tmp2 = load <8 x i8>, <8 x i8>* %B
|
2009-08-13 04:51:55 +08:00
|
|
|
%tmp3 = call <8 x i8> @llvm.arm.neon.vtbl1(<8 x i8> %tmp1, <8 x i8> %tmp2)
|
|
|
|
ret <8 x i8> %tmp3
|
|
|
|
}
|
|
|
|
|
2009-10-07 05:16:19 +08:00
|
|
|
define <8 x i8> @vtbl2(<8 x i8>* %A, %struct.__neon_int8x8x2_t* %B) nounwind {
|
2013-07-14 14:24:09 +08:00
|
|
|
;CHECK-LABEL: vtbl2:
|
2009-08-13 04:51:55 +08:00
|
|
|
;CHECK: vtbl.8
|
2015-02-28 05:17:42 +08:00
|
|
|
%tmp1 = load <8 x i8>, <8 x i8>* %A
|
|
|
|
%tmp2 = load %struct.__neon_int8x8x2_t, %struct.__neon_int8x8x2_t* %B
|
2009-10-07 05:16:19 +08:00
|
|
|
%tmp3 = extractvalue %struct.__neon_int8x8x2_t %tmp2, 0
|
|
|
|
%tmp4 = extractvalue %struct.__neon_int8x8x2_t %tmp2, 1
|
2009-08-13 04:51:55 +08:00
|
|
|
%tmp5 = call <8 x i8> @llvm.arm.neon.vtbl2(<8 x i8> %tmp1, <8 x i8> %tmp3, <8 x i8> %tmp4)
|
|
|
|
ret <8 x i8> %tmp5
|
|
|
|
}
|
|
|
|
|
2009-10-07 05:16:19 +08:00
|
|
|
define <8 x i8> @vtbl3(<8 x i8>* %A, %struct.__neon_int8x8x3_t* %B) nounwind {
|
2013-07-14 14:24:09 +08:00
|
|
|
;CHECK-LABEL: vtbl3:
|
2009-08-13 04:51:55 +08:00
|
|
|
;CHECK: vtbl.8
|
2015-02-28 05:17:42 +08:00
|
|
|
%tmp1 = load <8 x i8>, <8 x i8>* %A
|
|
|
|
%tmp2 = load %struct.__neon_int8x8x3_t, %struct.__neon_int8x8x3_t* %B
|
2009-10-07 05:16:19 +08:00
|
|
|
%tmp3 = extractvalue %struct.__neon_int8x8x3_t %tmp2, 0
|
|
|
|
%tmp4 = extractvalue %struct.__neon_int8x8x3_t %tmp2, 1
|
|
|
|
%tmp5 = extractvalue %struct.__neon_int8x8x3_t %tmp2, 2
|
2009-08-13 04:51:55 +08:00
|
|
|
%tmp6 = call <8 x i8> @llvm.arm.neon.vtbl3(<8 x i8> %tmp1, <8 x i8> %tmp3, <8 x i8> %tmp4, <8 x i8> %tmp5)
|
|
|
|
ret <8 x i8> %tmp6
|
|
|
|
}
|
|
|
|
|
2009-10-07 05:16:19 +08:00
|
|
|
define <8 x i8> @vtbl4(<8 x i8>* %A, %struct.__neon_int8x8x4_t* %B) nounwind {
|
2013-07-14 14:24:09 +08:00
|
|
|
;CHECK-LABEL: vtbl4:
|
2009-08-13 04:51:55 +08:00
|
|
|
;CHECK: vtbl.8
|
2015-02-28 05:17:42 +08:00
|
|
|
%tmp1 = load <8 x i8>, <8 x i8>* %A
|
|
|
|
%tmp2 = load %struct.__neon_int8x8x4_t, %struct.__neon_int8x8x4_t* %B
|
2009-10-07 05:16:19 +08:00
|
|
|
%tmp3 = extractvalue %struct.__neon_int8x8x4_t %tmp2, 0
|
|
|
|
%tmp4 = extractvalue %struct.__neon_int8x8x4_t %tmp2, 1
|
|
|
|
%tmp5 = extractvalue %struct.__neon_int8x8x4_t %tmp2, 2
|
|
|
|
%tmp6 = extractvalue %struct.__neon_int8x8x4_t %tmp2, 3
|
2009-08-13 04:51:55 +08:00
|
|
|
%tmp7 = call <8 x i8> @llvm.arm.neon.vtbl4(<8 x i8> %tmp1, <8 x i8> %tmp3, <8 x i8> %tmp4, <8 x i8> %tmp5, <8 x i8> %tmp6)
|
|
|
|
ret <8 x i8> %tmp7
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i8> @vtbx1(<8 x i8>* %A, <8 x i8>* %B, <8 x i8>* %C) nounwind {
|
2013-07-14 14:24:09 +08:00
|
|
|
;CHECK-LABEL: vtbx1:
|
2009-08-13 04:51:55 +08:00
|
|
|
;CHECK: vtbx.8
|
2015-02-28 05:17:42 +08:00
|
|
|
%tmp1 = load <8 x i8>, <8 x i8>* %A
|
|
|
|
%tmp2 = load <8 x i8>, <8 x i8>* %B
|
|
|
|
%tmp3 = load <8 x i8>, <8 x i8>* %C
|
2009-08-13 04:51:55 +08:00
|
|
|
%tmp4 = call <8 x i8> @llvm.arm.neon.vtbx1(<8 x i8> %tmp1, <8 x i8> %tmp2, <8 x i8> %tmp3)
|
|
|
|
ret <8 x i8> %tmp4
|
|
|
|
}
|
|
|
|
|
2009-10-07 05:16:19 +08:00
|
|
|
define <8 x i8> @vtbx2(<8 x i8>* %A, %struct.__neon_int8x8x2_t* %B, <8 x i8>* %C) nounwind {
|
2013-07-14 14:24:09 +08:00
|
|
|
;CHECK-LABEL: vtbx2:
|
2009-08-13 04:51:55 +08:00
|
|
|
;CHECK: vtbx.8
|
2015-02-28 05:17:42 +08:00
|
|
|
%tmp1 = load <8 x i8>, <8 x i8>* %A
|
|
|
|
%tmp2 = load %struct.__neon_int8x8x2_t, %struct.__neon_int8x8x2_t* %B
|
2009-10-07 05:16:19 +08:00
|
|
|
%tmp3 = extractvalue %struct.__neon_int8x8x2_t %tmp2, 0
|
|
|
|
%tmp4 = extractvalue %struct.__neon_int8x8x2_t %tmp2, 1
|
2015-02-28 05:17:42 +08:00
|
|
|
%tmp5 = load <8 x i8>, <8 x i8>* %C
|
2009-08-13 04:51:55 +08:00
|
|
|
%tmp6 = call <8 x i8> @llvm.arm.neon.vtbx2(<8 x i8> %tmp1, <8 x i8> %tmp3, <8 x i8> %tmp4, <8 x i8> %tmp5)
|
|
|
|
ret <8 x i8> %tmp6
|
|
|
|
}
|
|
|
|
|
2009-10-07 05:16:19 +08:00
|
|
|
define <8 x i8> @vtbx3(<8 x i8>* %A, %struct.__neon_int8x8x3_t* %B, <8 x i8>* %C) nounwind {
|
2013-07-14 14:24:09 +08:00
|
|
|
;CHECK-LABEL: vtbx3:
|
2009-08-13 04:51:55 +08:00
|
|
|
;CHECK: vtbx.8
|
2015-02-28 05:17:42 +08:00
|
|
|
%tmp1 = load <8 x i8>, <8 x i8>* %A
|
|
|
|
%tmp2 = load %struct.__neon_int8x8x3_t, %struct.__neon_int8x8x3_t* %B
|
2009-10-07 05:16:19 +08:00
|
|
|
%tmp3 = extractvalue %struct.__neon_int8x8x3_t %tmp2, 0
|
|
|
|
%tmp4 = extractvalue %struct.__neon_int8x8x3_t %tmp2, 1
|
|
|
|
%tmp5 = extractvalue %struct.__neon_int8x8x3_t %tmp2, 2
|
2015-02-28 05:17:42 +08:00
|
|
|
%tmp6 = load <8 x i8>, <8 x i8>* %C
|
2009-08-13 04:51:55 +08:00
|
|
|
%tmp7 = call <8 x i8> @llvm.arm.neon.vtbx3(<8 x i8> %tmp1, <8 x i8> %tmp3, <8 x i8> %tmp4, <8 x i8> %tmp5, <8 x i8> %tmp6)
|
|
|
|
ret <8 x i8> %tmp7
|
|
|
|
}
|
|
|
|
|
2009-10-07 05:16:19 +08:00
|
|
|
define <8 x i8> @vtbx4(<8 x i8>* %A, %struct.__neon_int8x8x4_t* %B, <8 x i8>* %C) nounwind {
|
2013-07-14 14:24:09 +08:00
|
|
|
;CHECK-LABEL: vtbx4:
|
2009-08-13 04:51:55 +08:00
|
|
|
;CHECK: vtbx.8
|
2015-02-28 05:17:42 +08:00
|
|
|
%tmp1 = load <8 x i8>, <8 x i8>* %A
|
|
|
|
%tmp2 = load %struct.__neon_int8x8x4_t, %struct.__neon_int8x8x4_t* %B
|
2009-10-07 05:16:19 +08:00
|
|
|
%tmp3 = extractvalue %struct.__neon_int8x8x4_t %tmp2, 0
|
|
|
|
%tmp4 = extractvalue %struct.__neon_int8x8x4_t %tmp2, 1
|
|
|
|
%tmp5 = extractvalue %struct.__neon_int8x8x4_t %tmp2, 2
|
|
|
|
%tmp6 = extractvalue %struct.__neon_int8x8x4_t %tmp2, 3
|
2015-02-28 05:17:42 +08:00
|
|
|
%tmp7 = load <8 x i8>, <8 x i8>* %C
|
2009-08-13 04:51:55 +08:00
|
|
|
%tmp8 = call <8 x i8> @llvm.arm.neon.vtbx4(<8 x i8> %tmp1, <8 x i8> %tmp3, <8 x i8> %tmp4, <8 x i8> %tmp5, <8 x i8> %tmp6, <8 x i8> %tmp7)
|
|
|
|
ret <8 x i8> %tmp8
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i8> @llvm.arm.neon.vtbl1(<8 x i8>, <8 x i8>) nounwind readnone
|
|
|
|
declare <8 x i8> @llvm.arm.neon.vtbl2(<8 x i8>, <8 x i8>, <8 x i8>) nounwind readnone
|
|
|
|
declare <8 x i8> @llvm.arm.neon.vtbl3(<8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>) nounwind readnone
|
|
|
|
declare <8 x i8> @llvm.arm.neon.vtbl4(<8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>) nounwind readnone
|
|
|
|
|
|
|
|
declare <8 x i8> @llvm.arm.neon.vtbx1(<8 x i8>, <8 x i8>, <8 x i8>) nounwind readnone
|
|
|
|
declare <8 x i8> @llvm.arm.neon.vtbx2(<8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>) nounwind readnone
|
|
|
|
declare <8 x i8> @llvm.arm.neon.vtbx3(<8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>) nounwind readnone
|
|
|
|
declare <8 x i8> @llvm.arm.neon.vtbx4(<8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>) nounwind readnone
|