2014-04-03 16:01:44 +00:00
|
|
|
; RUN: llc -mtriple=arm-eabi -mattr=+neon %s -o - | FileCheck %s
|
2009-06-22 23:27:02 +00:00
|
|
|
|
|
|
|
define <8 x i8> @vqshrns8(<8 x i16>* %A) nounwind {
|
2013-07-14 06:24:09 +00:00
|
|
|
;CHECK-LABEL: vqshrns8:
|
2009-10-08 22:33:53 +00:00
|
|
|
;CHECK: vqshrn.s16
|
2015-02-27 21:17:42 +00:00
|
|
|
%tmp1 = load <8 x i16>, <8 x i16>* %A
|
2009-06-22 23:27:02 +00:00
|
|
|
%tmp2 = call <8 x i8> @llvm.arm.neon.vqshiftns.v8i8(<8 x i16> %tmp1, <8 x i16> < i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8 >)
|
|
|
|
ret <8 x i8> %tmp2
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i16> @vqshrns16(<4 x i32>* %A) nounwind {
|
2013-07-14 06:24:09 +00:00
|
|
|
;CHECK-LABEL: vqshrns16:
|
2009-10-08 22:33:53 +00:00
|
|
|
;CHECK: vqshrn.s32
|
2015-02-27 21:17:42 +00:00
|
|
|
%tmp1 = load <4 x i32>, <4 x i32>* %A
|
2009-06-22 23:27:02 +00:00
|
|
|
%tmp2 = call <4 x i16> @llvm.arm.neon.vqshiftns.v4i16(<4 x i32> %tmp1, <4 x i32> < i32 -16, i32 -16, i32 -16, i32 -16 >)
|
|
|
|
ret <4 x i16> %tmp2
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x i32> @vqshrns32(<2 x i64>* %A) nounwind {
|
2013-07-14 06:24:09 +00:00
|
|
|
;CHECK-LABEL: vqshrns32:
|
2009-10-08 22:33:53 +00:00
|
|
|
;CHECK: vqshrn.s64
|
2015-02-27 21:17:42 +00:00
|
|
|
%tmp1 = load <2 x i64>, <2 x i64>* %A
|
2009-06-22 23:27:02 +00:00
|
|
|
%tmp2 = call <2 x i32> @llvm.arm.neon.vqshiftns.v2i32(<2 x i64> %tmp1, <2 x i64> < i64 -32, i64 -32 >)
|
|
|
|
ret <2 x i32> %tmp2
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i8> @vqshrnu8(<8 x i16>* %A) nounwind {
|
2013-07-14 06:24:09 +00:00
|
|
|
;CHECK-LABEL: vqshrnu8:
|
2009-10-08 22:33:53 +00:00
|
|
|
;CHECK: vqshrn.u16
|
2015-02-27 21:17:42 +00:00
|
|
|
%tmp1 = load <8 x i16>, <8 x i16>* %A
|
2009-06-22 23:27:02 +00:00
|
|
|
%tmp2 = call <8 x i8> @llvm.arm.neon.vqshiftnu.v8i8(<8 x i16> %tmp1, <8 x i16> < i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8 >)
|
|
|
|
ret <8 x i8> %tmp2
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i16> @vqshrnu16(<4 x i32>* %A) nounwind {
|
2013-07-14 06:24:09 +00:00
|
|
|
;CHECK-LABEL: vqshrnu16:
|
2009-10-08 22:33:53 +00:00
|
|
|
;CHECK: vqshrn.u32
|
2015-02-27 21:17:42 +00:00
|
|
|
%tmp1 = load <4 x i32>, <4 x i32>* %A
|
2009-06-22 23:27:02 +00:00
|
|
|
%tmp2 = call <4 x i16> @llvm.arm.neon.vqshiftnu.v4i16(<4 x i32> %tmp1, <4 x i32> < i32 -16, i32 -16, i32 -16, i32 -16 >)
|
|
|
|
ret <4 x i16> %tmp2
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x i32> @vqshrnu32(<2 x i64>* %A) nounwind {
|
2013-07-14 06:24:09 +00:00
|
|
|
;CHECK-LABEL: vqshrnu32:
|
2009-10-08 22:33:53 +00:00
|
|
|
;CHECK: vqshrn.u64
|
2015-02-27 21:17:42 +00:00
|
|
|
%tmp1 = load <2 x i64>, <2 x i64>* %A
|
2009-06-22 23:27:02 +00:00
|
|
|
%tmp2 = call <2 x i32> @llvm.arm.neon.vqshiftnu.v2i32(<2 x i64> %tmp1, <2 x i64> < i64 -32, i64 -32 >)
|
|
|
|
ret <2 x i32> %tmp2
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i8> @vqshruns8(<8 x i16>* %A) nounwind {
|
2013-07-14 06:24:09 +00:00
|
|
|
;CHECK-LABEL: vqshruns8:
|
2009-10-08 22:33:53 +00:00
|
|
|
;CHECK: vqshrun.s16
|
2015-02-27 21:17:42 +00:00
|
|
|
%tmp1 = load <8 x i16>, <8 x i16>* %A
|
2009-06-22 23:27:02 +00:00
|
|
|
%tmp2 = call <8 x i8> @llvm.arm.neon.vqshiftnsu.v8i8(<8 x i16> %tmp1, <8 x i16> < i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8 >)
|
|
|
|
ret <8 x i8> %tmp2
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i16> @vqshruns16(<4 x i32>* %A) nounwind {
|
2013-07-14 06:24:09 +00:00
|
|
|
;CHECK-LABEL: vqshruns16:
|
2009-10-08 22:33:53 +00:00
|
|
|
;CHECK: vqshrun.s32
|
2015-02-27 21:17:42 +00:00
|
|
|
%tmp1 = load <4 x i32>, <4 x i32>* %A
|
2009-06-22 23:27:02 +00:00
|
|
|
%tmp2 = call <4 x i16> @llvm.arm.neon.vqshiftnsu.v4i16(<4 x i32> %tmp1, <4 x i32> < i32 -16, i32 -16, i32 -16, i32 -16 >)
|
|
|
|
ret <4 x i16> %tmp2
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x i32> @vqshruns32(<2 x i64>* %A) nounwind {
|
2013-07-14 06:24:09 +00:00
|
|
|
;CHECK-LABEL: vqshruns32:
|
2009-10-08 22:33:53 +00:00
|
|
|
;CHECK: vqshrun.s64
|
2015-02-27 21:17:42 +00:00
|
|
|
%tmp1 = load <2 x i64>, <2 x i64>* %A
|
2009-06-22 23:27:02 +00:00
|
|
|
%tmp2 = call <2 x i32> @llvm.arm.neon.vqshiftnsu.v2i32(<2 x i64> %tmp1, <2 x i64> < i64 -32, i64 -32 >)
|
|
|
|
ret <2 x i32> %tmp2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i8> @llvm.arm.neon.vqshiftns.v8i8(<8 x i16>, <8 x i16>) nounwind readnone
|
|
|
|
declare <4 x i16> @llvm.arm.neon.vqshiftns.v4i16(<4 x i32>, <4 x i32>) nounwind readnone
|
|
|
|
declare <2 x i32> @llvm.arm.neon.vqshiftns.v2i32(<2 x i64>, <2 x i64>) nounwind readnone
|
|
|
|
|
|
|
|
declare <8 x i8> @llvm.arm.neon.vqshiftnu.v8i8(<8 x i16>, <8 x i16>) nounwind readnone
|
|
|
|
declare <4 x i16> @llvm.arm.neon.vqshiftnu.v4i16(<4 x i32>, <4 x i32>) nounwind readnone
|
|
|
|
declare <2 x i32> @llvm.arm.neon.vqshiftnu.v2i32(<2 x i64>, <2 x i64>) nounwind readnone
|
|
|
|
|
|
|
|
declare <8 x i8> @llvm.arm.neon.vqshiftnsu.v8i8(<8 x i16>, <8 x i16>) nounwind readnone
|
|
|
|
declare <4 x i16> @llvm.arm.neon.vqshiftnsu.v4i16(<4 x i32>, <4 x i32>) nounwind readnone
|
|
|
|
declare <2 x i32> @llvm.arm.neon.vqshiftnsu.v2i32(<2 x i64>, <2 x i64>) nounwind readnone
|
2009-10-09 20:20:54 +00:00
|
|
|
|
|
|
|
define <8 x i8> @vqrshrns8(<8 x i16>* %A) nounwind {
|
2013-07-14 06:24:09 +00:00
|
|
|
;CHECK-LABEL: vqrshrns8:
|
2009-10-09 20:20:54 +00:00
|
|
|
;CHECK: vqrshrn.s16
|
2015-02-27 21:17:42 +00:00
|
|
|
%tmp1 = load <8 x i16>, <8 x i16>* %A
|
2009-10-09 20:20:54 +00:00
|
|
|
%tmp2 = call <8 x i8> @llvm.arm.neon.vqrshiftns.v8i8(<8 x i16> %tmp1, <8 x i16> < i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8 >)
|
|
|
|
ret <8 x i8> %tmp2
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i16> @vqrshrns16(<4 x i32>* %A) nounwind {
|
2013-07-14 06:24:09 +00:00
|
|
|
;CHECK-LABEL: vqrshrns16:
|
2009-10-09 20:20:54 +00:00
|
|
|
;CHECK: vqrshrn.s32
|
2015-02-27 21:17:42 +00:00
|
|
|
%tmp1 = load <4 x i32>, <4 x i32>* %A
|
2009-10-09 20:20:54 +00:00
|
|
|
%tmp2 = call <4 x i16> @llvm.arm.neon.vqrshiftns.v4i16(<4 x i32> %tmp1, <4 x i32> < i32 -16, i32 -16, i32 -16, i32 -16 >)
|
|
|
|
ret <4 x i16> %tmp2
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x i32> @vqrshrns32(<2 x i64>* %A) nounwind {
|
2013-07-14 06:24:09 +00:00
|
|
|
;CHECK-LABEL: vqrshrns32:
|
2009-10-09 20:20:54 +00:00
|
|
|
;CHECK: vqrshrn.s64
|
2015-02-27 21:17:42 +00:00
|
|
|
%tmp1 = load <2 x i64>, <2 x i64>* %A
|
2009-10-09 20:20:54 +00:00
|
|
|
%tmp2 = call <2 x i32> @llvm.arm.neon.vqrshiftns.v2i32(<2 x i64> %tmp1, <2 x i64> < i64 -32, i64 -32 >)
|
|
|
|
ret <2 x i32> %tmp2
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i8> @vqrshrnu8(<8 x i16>* %A) nounwind {
|
2013-07-14 06:24:09 +00:00
|
|
|
;CHECK-LABEL: vqrshrnu8:
|
2009-10-09 20:20:54 +00:00
|
|
|
;CHECK: vqrshrn.u16
|
2015-02-27 21:17:42 +00:00
|
|
|
%tmp1 = load <8 x i16>, <8 x i16>* %A
|
2009-10-09 20:20:54 +00:00
|
|
|
%tmp2 = call <8 x i8> @llvm.arm.neon.vqrshiftnu.v8i8(<8 x i16> %tmp1, <8 x i16> < i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8 >)
|
|
|
|
ret <8 x i8> %tmp2
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i16> @vqrshrnu16(<4 x i32>* %A) nounwind {
|
2013-07-14 06:24:09 +00:00
|
|
|
;CHECK-LABEL: vqrshrnu16:
|
2009-10-09 20:20:54 +00:00
|
|
|
;CHECK: vqrshrn.u32
|
2015-02-27 21:17:42 +00:00
|
|
|
%tmp1 = load <4 x i32>, <4 x i32>* %A
|
2009-10-09 20:20:54 +00:00
|
|
|
%tmp2 = call <4 x i16> @llvm.arm.neon.vqrshiftnu.v4i16(<4 x i32> %tmp1, <4 x i32> < i32 -16, i32 -16, i32 -16, i32 -16 >)
|
|
|
|
ret <4 x i16> %tmp2
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x i32> @vqrshrnu32(<2 x i64>* %A) nounwind {
|
2013-07-14 06:24:09 +00:00
|
|
|
;CHECK-LABEL: vqrshrnu32:
|
2009-10-09 20:20:54 +00:00
|
|
|
;CHECK: vqrshrn.u64
|
2015-02-27 21:17:42 +00:00
|
|
|
%tmp1 = load <2 x i64>, <2 x i64>* %A
|
2009-10-09 20:20:54 +00:00
|
|
|
%tmp2 = call <2 x i32> @llvm.arm.neon.vqrshiftnu.v2i32(<2 x i64> %tmp1, <2 x i64> < i64 -32, i64 -32 >)
|
|
|
|
ret <2 x i32> %tmp2
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i8> @vqrshruns8(<8 x i16>* %A) nounwind {
|
2013-07-14 06:24:09 +00:00
|
|
|
;CHECK-LABEL: vqrshruns8:
|
2009-10-09 20:20:54 +00:00
|
|
|
;CHECK: vqrshrun.s16
|
2015-02-27 21:17:42 +00:00
|
|
|
%tmp1 = load <8 x i16>, <8 x i16>* %A
|
2009-10-09 20:20:54 +00:00
|
|
|
%tmp2 = call <8 x i8> @llvm.arm.neon.vqrshiftnsu.v8i8(<8 x i16> %tmp1, <8 x i16> < i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8, i16 -8 >)
|
|
|
|
ret <8 x i8> %tmp2
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i16> @vqrshruns16(<4 x i32>* %A) nounwind {
|
2013-07-14 06:24:09 +00:00
|
|
|
;CHECK-LABEL: vqrshruns16:
|
2009-10-09 20:20:54 +00:00
|
|
|
;CHECK: vqrshrun.s32
|
2015-02-27 21:17:42 +00:00
|
|
|
%tmp1 = load <4 x i32>, <4 x i32>* %A
|
2009-10-09 20:20:54 +00:00
|
|
|
%tmp2 = call <4 x i16> @llvm.arm.neon.vqrshiftnsu.v4i16(<4 x i32> %tmp1, <4 x i32> < i32 -16, i32 -16, i32 -16, i32 -16 >)
|
|
|
|
ret <4 x i16> %tmp2
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x i32> @vqrshruns32(<2 x i64>* %A) nounwind {
|
2013-07-14 06:24:09 +00:00
|
|
|
;CHECK-LABEL: vqrshruns32:
|
2009-10-09 20:20:54 +00:00
|
|
|
;CHECK: vqrshrun.s64
|
2015-02-27 21:17:42 +00:00
|
|
|
%tmp1 = load <2 x i64>, <2 x i64>* %A
|
2009-10-09 20:20:54 +00:00
|
|
|
%tmp2 = call <2 x i32> @llvm.arm.neon.vqrshiftnsu.v2i32(<2 x i64> %tmp1, <2 x i64> < i64 -32, i64 -32 >)
|
|
|
|
ret <2 x i32> %tmp2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i8> @llvm.arm.neon.vqrshiftns.v8i8(<8 x i16>, <8 x i16>) nounwind readnone
|
|
|
|
declare <4 x i16> @llvm.arm.neon.vqrshiftns.v4i16(<4 x i32>, <4 x i32>) nounwind readnone
|
|
|
|
declare <2 x i32> @llvm.arm.neon.vqrshiftns.v2i32(<2 x i64>, <2 x i64>) nounwind readnone
|
|
|
|
|
|
|
|
declare <8 x i8> @llvm.arm.neon.vqrshiftnu.v8i8(<8 x i16>, <8 x i16>) nounwind readnone
|
|
|
|
declare <4 x i16> @llvm.arm.neon.vqrshiftnu.v4i16(<4 x i32>, <4 x i32>) nounwind readnone
|
|
|
|
declare <2 x i32> @llvm.arm.neon.vqrshiftnu.v2i32(<2 x i64>, <2 x i64>) nounwind readnone
|
|
|
|
|
|
|
|
declare <8 x i8> @llvm.arm.neon.vqrshiftnsu.v8i8(<8 x i16>, <8 x i16>) nounwind readnone
|
|
|
|
declare <4 x i16> @llvm.arm.neon.vqrshiftnsu.v4i16(<4 x i32>, <4 x i32>) nounwind readnone
|
|
|
|
declare <2 x i32> @llvm.arm.neon.vqrshiftnsu.v2i32(<2 x i64>, <2 x i64>) nounwind readnone
|