forked from OSchip/llvm-project
52 lines
2.4 KiB
LLVM
52 lines
2.4 KiB
LLVM
|
; RUN: llc -mtriple=aarch64-none-linux-gnu -mattr=+neon < %s | FileCheck %s
|
||
|
|
||
|
; CHECK-LABEL: fun1:
|
||
|
; CHECK: uzp1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
|
||
|
; CHECK-NOT: mov
|
||
|
define i32 @fun1() {
|
||
|
entry:
|
||
|
%vtbl1.i.1 = tail call <16 x i8> @llvm.aarch64.neon.tbl1.v16i8(<16 x i8> <i8 0, i8 16, i8 19, i8 4, i8 -65, i8 -65, i8 -71, i8 -71, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>, <16 x i8> undef)
|
||
|
%vuzp.i212.1 = shufflevector <16 x i8> %vtbl1.i.1, <16 x i8> undef, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>
|
||
|
%scevgep = getelementptr <8 x i8>, <8 x i8>* undef, i64 1
|
||
|
store <8 x i8> %vuzp.i212.1, <8 x i8>* %scevgep, align 1
|
||
|
ret i32 undef
|
||
|
}
|
||
|
|
||
|
; CHECK-LABEL: fun2:
|
||
|
; CHECK: uzp2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
|
||
|
; CHECK-NOT: mov
|
||
|
define i32 @fun2() {
|
||
|
entry:
|
||
|
%vtbl1.i.1 = tail call <16 x i8> @llvm.aarch64.neon.tbl1.v16i8(<16 x i8> <i8 0, i8 16, i8 19, i8 4, i8 -65, i8 -65, i8 -71, i8 -71, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>, <16 x i8> undef)
|
||
|
%vuzp.i212.1 = shufflevector <16 x i8> %vtbl1.i.1, <16 x i8> undef, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15>
|
||
|
%scevgep = getelementptr <8 x i8>, <8 x i8>* undef, i64 1
|
||
|
store <8 x i8> %vuzp.i212.1, <8 x i8>* %scevgep, align 1
|
||
|
ret i32 undef
|
||
|
}
|
||
|
|
||
|
; CHECK-LABEL: fun3:
|
||
|
; CHECK-NOT: uzp1
|
||
|
; CHECK: mov
|
||
|
define i32 @fun3() {
|
||
|
entry:
|
||
|
%vtbl1.i.1 = tail call <16 x i8> @llvm.aarch64.neon.tbl1.v16i8(<16 x i8> <i8 0, i8 16, i8 19, i8 4, i8 -65, i8 -65, i8 -71, i8 -71, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>, <16 x i8> undef)
|
||
|
%vuzp.i212.1 = shufflevector <16 x i8> %vtbl1.i.1, <16 x i8> undef, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 15>
|
||
|
%scevgep = getelementptr <8 x i8>, <8 x i8>* undef, i64 1
|
||
|
store <8 x i8> %vuzp.i212.1, <8 x i8>* %scevgep, align 1
|
||
|
ret i32 undef
|
||
|
}
|
||
|
|
||
|
; CHECK-LABEL: fun4:
|
||
|
; CHECK-NOT: uzp2
|
||
|
; CHECK: mov
|
||
|
define i32 @fun4() {
|
||
|
entry:
|
||
|
%vtbl1.i.1 = tail call <16 x i8> @llvm.aarch64.neon.tbl1.v16i8(<16 x i8> <i8 0, i8 16, i8 19, i8 4, i8 -65, i8 -65, i8 -71, i8 -71, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>, <16 x i8> undef)
|
||
|
%vuzp.i212.1 = shufflevector <16 x i8> %vtbl1.i.1, <16 x i8> undef, <8 x i32> <i32 3, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15>
|
||
|
%scevgep = getelementptr <8 x i8>, <8 x i8>* undef, i64 1
|
||
|
store <8 x i8> %vuzp.i212.1, <8 x i8>* %scevgep, align 1
|
||
|
ret i32 undef
|
||
|
}
|
||
|
|
||
|
declare <16 x i8> @llvm.aarch64.neon.tbl1.v16i8(<16 x i8>, <16 x i8>)
|