diff --git a/llvm/test/CodeGen/AArch64/arm64-vector-imm.ll b/llvm/test/CodeGen/AArch64/arm64-vector-imm.ll index 08bceb850df406..a3efa6b961e63c 100644 --- a/llvm/test/CodeGen/AArch64/arm64-vector-imm.ll +++ b/llvm/test/CodeGen/AArch64/arm64-vector-imm.ll @@ -1,134 +1,165 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 ; RUN: llc < %s -mtriple=arm64-eabi -aarch64-neon-syntax=apple | FileCheck %s define <8 x i8> @v_orrimm(ptr %A) nounwind { ; CHECK-LABEL: v_orrimm: -; CHECK-NOT: mov -; CHECK-NOT: mvn -; CHECK: orr - %tmp1 = load <8 x i8>, ptr %A - %tmp3 = or <8 x i8> %tmp1, - ret <8 x i8> %tmp3 +; CHECK: // %bb.0: +; CHECK-NEXT: ldr d0, [x0] +; CHECK-NEXT: orr.2s v0, #1, lsl #24 +; CHECK-NEXT: ret + %tmp1 = load <8 x i8>, ptr %A + %tmp3 = or <8 x i8> %tmp1, + ret <8 x i8> %tmp3 } define <16 x i8> @v_orrimmQ(ptr %A) nounwind { -; CHECK: v_orrimmQ -; CHECK-NOT: mov -; CHECK-NOT: mvn -; CHECK: orr - %tmp1 = load <16 x i8>, ptr %A - %tmp3 = or <16 x i8> %tmp1, - ret <16 x i8> %tmp3 +; CHECK-LABEL: v_orrimmQ: +; CHECK: // %bb.0: +; CHECK-NEXT: ldr q0, [x0] +; CHECK-NEXT: orr.4s v0, #1, lsl #24 +; CHECK-NEXT: ret + %tmp1 = load <16 x i8>, ptr %A + %tmp3 = or <16 x i8> %tmp1, + ret <16 x i8> %tmp3 } define <8 x i8> @v_bicimm(ptr %A) nounwind { ; CHECK-LABEL: v_bicimm: -; CHECK-NOT: mov -; CHECK-NOT: mvn -; CHECK: bic - %tmp1 = load <8 x i8>, ptr %A - %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 +; CHECK: // %bb.0: +; CHECK-NEXT: ldr d0, [x0] +; CHECK-NEXT: bic.2s v0, #255, lsl #24 +; CHECK-NEXT: ret + %tmp1 = load <8 x i8>, ptr %A + %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(ptr %A) nounwind { ; CHECK-LABEL: v_bicimmQ: -; CHECK-NOT: mov -; CHECK-NOT: mvn -; CHECK: bic - %tmp1 = load <16 x i8>, ptr %A - %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 +; CHECK: // %bb.0: +; CHECK-NEXT: ldr q0, [x0] +; CHECK-NEXT: bic.4s v0, #255, lsl #24 +; CHECK-NEXT: ret + %tmp1 = load <16 x i8>, ptr %A + %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 -; CHECK: fmov.2d v1, #1.0000000 +; CHECK-LABEL: foo: +; CHECK: // %bb.0: +; CHECK-NEXT: fmov.2d v1, #1.00000000 +; CHECK-NEXT: fadd.2d v0, v0, v1 +; CHECK-NEXT: ret %add = fadd <2 x double> %bar, ret <2 x double> %add } define <4 x i32> @movi_4s_imm_t1() nounwind readnone ssp { -entry: ; CHECK-LABEL: movi_4s_imm_t1: -; CHECK: movi.4s v0, #75 +; CHECK: // %bb.0: // %entry +; CHECK-NEXT: movi.4s v0, #75 +; CHECK-NEXT: ret +entry: ret <4 x i32> } define <4 x i32> @movi_4s_imm_t2() nounwind readnone ssp { -entry: ; CHECK-LABEL: movi_4s_imm_t2: -; CHECK: movi.4s v0, #75, lsl #8 +; CHECK: // %bb.0: // %entry +; CHECK-NEXT: movi.4s v0, #75, lsl #8 +; CHECK-NEXT: ret +entry: ret <4 x i32> } define <4 x i32> @movi_4s_imm_t3() nounwind readnone ssp { -entry: ; CHECK-LABEL: movi_4s_imm_t3: -; CHECK: movi.4s v0, #75, lsl #16 +; CHECK: // %bb.0: // %entry +; CHECK-NEXT: movi.4s v0, #75, lsl #16 +; CHECK-NEXT: ret +entry: ret <4 x i32> } define <4 x i32> @movi_4s_imm_t4() nounwind readnone ssp { -entry: ; CHECK-LABEL: movi_4s_imm_t4: -; CHECK: movi.4s v0, #75, lsl #24 +; CHECK: // %bb.0: // %entry +; CHECK-NEXT: movi.4s v0, #75, lsl #24 +; CHECK-NEXT: ret +entry: ret <4 x i32> } define <8 x i16> @movi_8h_imm_t5() nounwind readnone ssp { -entry: ; CHECK-LABEL: movi_8h_imm_t5: -; CHECK: movi.8h v0, #75 +; CHECK: // %bb.0: // %entry +; CHECK-NEXT: movi.8h v0, #75 +; CHECK-NEXT: ret +entry: ret <8 x i16> } ; rdar://11989841 define <8 x i16> @movi_8h_imm_t6() nounwind readnone ssp { -entry: ; CHECK-LABEL: movi_8h_imm_t6: -; CHECK: movi.8h v0, #75, lsl #8 +; CHECK: // %bb.0: // %entry +; CHECK-NEXT: movi.8h v0, #75, lsl #8 +; CHECK-NEXT: ret +entry: ret <8 x i16> } define <4 x i32> @movi_4s_imm_t7() nounwind readnone ssp { -entry: ; CHECK-LABEL: movi_4s_imm_t7: -; CHECK: movi.4s v0, #75, msl #8 -ret <4 x i32> +; CHECK: // %bb.0: // %entry +; CHECK-NEXT: movi.4s v0, #75, msl #8 +; CHECK-NEXT: ret +entry: + ret <4 x i32> } define <4 x i32> @movi_4s_imm_t8() nounwind readnone ssp { -entry: ; CHECK-LABEL: movi_4s_imm_t8: -; CHECK: movi.4s v0, #75, msl #16 -ret <4 x i32> +; CHECK: // %bb.0: // %entry +; CHECK-NEXT: movi.4s v0, #75, msl #16 +; CHECK-NEXT: ret +entry: + ret <4 x i32> } define <16 x i8> @movi_16b_imm_t9() nounwind readnone ssp { -entry: ; CHECK-LABEL: movi_16b_imm_t9: -; CHECK: movi.16b v0, #75 -ret <16 x i8> +; CHECK: // %bb.0: // %entry +; CHECK-NEXT: movi.16b v0, #75 +; CHECK-NEXT: ret +entry: + ret <16 x i8> } 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> +; CHECK: // %bb.0: // %entry +; CHECK-NEXT: movi.2d v0, #0xff00ff00ff00ff +; CHECK-NEXT: ret +entry: + ret <2 x i64> } define <4 x i32> @movi_4s_imm_t11() nounwind readnone ssp { -entry: ; CHECK-LABEL: movi_4s_imm_t11: -; CHECK: fmov.4s v0, #-0.32812500 -ret <4 x i32> +; CHECK: // %bb.0: // %entry +; CHECK-NEXT: fmov.4s v0, #-0.32812500 +; CHECK-NEXT: ret +entry: + ret <4 x i32> } define <2 x i64> @movi_2d_imm_t12() nounwind readnone ssp { -entry: ; CHECK-LABEL: movi_2d_imm_t12: -; CHECK: fmov.2d v0, #-0.17187500 -ret <2 x i64> +; CHECK: // %bb.0: // %entry +; CHECK-NEXT: fmov.2d v0, #-0.17187500 +; CHECK-NEXT: ret +entry: + ret <2 x i64> }