2014-05-24 12:50:23 +00:00
|
|
|
; RUN: llc < %s -march=arm64 -aarch64-neon-syntax=apple | FileCheck %s
|
2014-03-29 10:18:08 +00:00
|
|
|
|
|
|
|
define <8 x i8> @v_orrimm(<8 x i8>* %A) nounwind {
|
|
|
|
; CHECK-LABEL: v_orrimm:
|
|
|
|
; CHECK-NOT: mov
|
|
|
|
; CHECK-NOT: mvn
|
|
|
|
; CHECK: orr
|
2015-02-27 21:17:42 +00:00
|
|
|
%tmp1 = load <8 x i8>, <8 x i8>* %A
|
2014-03-29 10:18:08 +00:00
|
|
|
%tmp3 = or <8 x i8> %tmp1, <i8 0, i8 0, i8 0, i8 1, i8 0, i8 0, i8 0, i8 1>
|
|
|
|
ret <8 x i8> %tmp3
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @v_orrimmQ(<16 x i8>* %A) nounwind {
|
|
|
|
; CHECK: v_orrimmQ
|
|
|
|
; CHECK-NOT: mov
|
|
|
|
; CHECK-NOT: mvn
|
|
|
|
; CHECK: orr
|
2015-02-27 21:17:42 +00:00
|
|
|
%tmp1 = load <16 x i8>, <16 x i8>* %A
|
2014-03-29 10:18:08 +00:00
|
|
|
%tmp3 = or <16 x i8> %tmp1, <i8 0, i8 0, i8 0, i8 1, i8 0, i8 0, i8 0, i8 1, i8 0, i8 0, i8 0, i8 1, i8 0, i8 0, i8 0, i8 1>
|
|
|
|
ret <16 x i8> %tmp3
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i8> @v_bicimm(<8 x i8>* %A) nounwind {
|
|
|
|
; CHECK-LABEL: v_bicimm:
|
|
|
|
; CHECK-NOT: mov
|
|
|
|
; CHECK-NOT: mvn
|
|
|
|
; CHECK: bic
|
2015-02-27 21:17:42 +00:00
|
|
|
%tmp1 = load <8 x i8>, <8 x i8>* %A
|
2014-03-29 10:18:08 +00:00
|
|
|
%tmp3 = and <8 x i8> %tmp1, < i8 -1, i8 -1, i8 -1, i8 0, i8 -1, i8 -1, i8 -1, i8 0 >
|
|
|
|
ret <8 x i8> %tmp3
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @v_bicimmQ(<16 x i8>* %A) nounwind {
|
|
|
|
; CHECK-LABEL: v_bicimmQ:
|
|
|
|
; CHECK-NOT: mov
|
|
|
|
; CHECK-NOT: mvn
|
|
|
|
; CHECK: bic
|
2015-02-27 21:17:42 +00:00
|
|
|
%tmp1 = load <16 x i8>, <16 x i8>* %A
|
2014-03-29 10:18:08 +00:00
|
|
|
%tmp3 = and <16 x i8> %tmp1, < i8 -1, i8 -1, i8 -1, i8 0, i8 -1, i8 -1, i8 -1, i8 0, i8 -1, i8 -1, i8 -1, i8 0, i8 -1, i8 -1, i8 -1, i8 0 >
|
|
|
|
ret <16 x i8> %tmp3
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x double> @foo(<2 x double> %bar) nounwind {
|
|
|
|
; CHECK: foo
|
2014-04-30 16:13:34 +00:00
|
|
|
; CHECK: fmov.2d v1, #1.0000000
|
2014-03-29 10:18:08 +00:00
|
|
|
%add = fadd <2 x double> %bar, <double 1.0, double 1.0>
|
|
|
|
ret <2 x double> %add
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @movi_4s_imm_t1() nounwind readnone ssp {
|
|
|
|
entry:
|
|
|
|
; CHECK-LABEL: movi_4s_imm_t1:
|
2014-04-30 11:19:28 +00:00
|
|
|
; CHECK: movi.4s v0, #0x4b
|
2014-03-29 10:18:08 +00:00
|
|
|
ret <4 x i32> <i32 75, i32 75, i32 75, i32 75>
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @movi_4s_imm_t2() nounwind readnone ssp {
|
|
|
|
entry:
|
|
|
|
; CHECK-LABEL: movi_4s_imm_t2:
|
2014-04-30 11:19:28 +00:00
|
|
|
; CHECK: movi.4s v0, #0x4b, lsl #8
|
2014-03-29 10:18:08 +00:00
|
|
|
ret <4 x i32> <i32 19200, i32 19200, i32 19200, i32 19200>
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @movi_4s_imm_t3() nounwind readnone ssp {
|
|
|
|
entry:
|
|
|
|
; CHECK-LABEL: movi_4s_imm_t3:
|
2014-04-30 11:19:28 +00:00
|
|
|
; CHECK: movi.4s v0, #0x4b, lsl #16
|
2014-03-29 10:18:08 +00:00
|
|
|
ret <4 x i32> <i32 4915200, i32 4915200, i32 4915200, i32 4915200>
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @movi_4s_imm_t4() nounwind readnone ssp {
|
|
|
|
entry:
|
|
|
|
; CHECK-LABEL: movi_4s_imm_t4:
|
2014-04-30 11:19:28 +00:00
|
|
|
; CHECK: movi.4s v0, #0x4b, lsl #24
|
2014-03-29 10:18:08 +00:00
|
|
|
ret <4 x i32> <i32 1258291200, i32 1258291200, i32 1258291200, i32 1258291200>
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i16> @movi_8h_imm_t5() nounwind readnone ssp {
|
|
|
|
entry:
|
|
|
|
; CHECK-LABEL: movi_8h_imm_t5:
|
2014-04-30 11:19:28 +00:00
|
|
|
; CHECK: movi.8h v0, #0x4b
|
2014-03-29 10:18:08 +00:00
|
|
|
ret <8 x i16> <i16 75, i16 75, i16 75, i16 75, i16 75, i16 75, i16 75, i16 75>
|
|
|
|
}
|
|
|
|
|
|
|
|
; rdar://11989841
|
|
|
|
define <8 x i16> @movi_8h_imm_t6() nounwind readnone ssp {
|
|
|
|
entry:
|
|
|
|
; CHECK-LABEL: movi_8h_imm_t6:
|
2014-04-30 11:19:28 +00:00
|
|
|
; CHECK: movi.8h v0, #0x4b, lsl #8
|
2014-03-29 10:18:08 +00:00
|
|
|
ret <8 x i16> <i16 19200, i16 19200, i16 19200, i16 19200, i16 19200, i16 19200, i16 19200, i16 19200>
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @movi_4s_imm_t7() nounwind readnone ssp {
|
|
|
|
entry:
|
|
|
|
; CHECK-LABEL: movi_4s_imm_t7:
|
2014-04-30 11:19:28 +00:00
|
|
|
; CHECK: movi.4s v0, #0x4b, msl #8
|
2014-03-29 10:18:08 +00:00
|
|
|
ret <4 x i32> <i32 19455, i32 19455, i32 19455, i32 19455>
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @movi_4s_imm_t8() nounwind readnone ssp {
|
|
|
|
entry:
|
|
|
|
; CHECK-LABEL: movi_4s_imm_t8:
|
2014-04-30 11:19:28 +00:00
|
|
|
; CHECK: movi.4s v0, #0x4b, msl #16
|
2014-03-29 10:18:08 +00:00
|
|
|
ret <4 x i32> <i32 4980735, i32 4980735, i32 4980735, i32 4980735>
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i8> @movi_16b_imm_t9() nounwind readnone ssp {
|
|
|
|
entry:
|
|
|
|
; CHECK-LABEL: movi_16b_imm_t9:
|
2014-04-30 11:19:28 +00:00
|
|
|
; CHECK: movi.16b v0, #0x4b
|
2014-03-29 10:18:08 +00:00
|
|
|
ret <16 x i8> <i8 75, i8 75, i8 75, i8 75, i8 75, i8 75, i8 75, i8 75,
|
|
|
|
i8 75, i8 75, i8 75, i8 75, i8 75, i8 75, i8 75, i8 75>
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x i64> @movi_2d_imm_t10() nounwind readnone ssp {
|
|
|
|
entry:
|
|
|
|
; CHECK-LABEL: movi_2d_imm_t10:
|
|
|
|
; CHECK: movi.2d v0, #0xff00ff00ff00ff
|
|
|
|
ret <2 x i64> <i64 71777214294589695, i64 71777214294589695>
|
|
|
|
}
|
|
|
|
|
|
|
|
define <4 x i32> @movi_4s_imm_t11() nounwind readnone ssp {
|
|
|
|
entry:
|
|
|
|
; CHECK-LABEL: movi_4s_imm_t11:
|
2014-04-30 16:13:34 +00:00
|
|
|
; CHECK: fmov.4s v0, #-0.32812500
|
2014-03-29 10:18:08 +00:00
|
|
|
ret <4 x i32> <i32 3198681088, i32 3198681088, i32 3198681088, i32 3198681088>
|
|
|
|
}
|
|
|
|
|
|
|
|
define <2 x i64> @movi_2d_imm_t12() nounwind readnone ssp {
|
|
|
|
entry:
|
|
|
|
; CHECK-LABEL: movi_2d_imm_t12:
|
2014-04-30 16:13:34 +00:00
|
|
|
; CHECK: fmov.2d v0, #-0.17187500
|
2014-03-29 10:18:08 +00:00
|
|
|
ret <2 x i64> <i64 13818732506632945664, i64 13818732506632945664>
|
|
|
|
}
|