From: Bob Wilson Date: Fri, 22 Apr 2011 04:06:49 +0000 (+0000) Subject: Add a testcase for svn r129964 (Neon load/store intrinsic alignments). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=97fb6f33f7ff850c2ce8a52e1f2ad9eb520d71e0;p=clang Add a testcase for svn r129964 (Neon load/store intrinsic alignments). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129979 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/arm-vector-align.c b/test/CodeGen/arm-vector-align.c new file mode 100644 index 0000000000..c1119cb5b7 --- /dev/null +++ b/test/CodeGen/arm-vector-align.c @@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -triple thumbv7-apple-darwin \ +// RUN: -target-abi apcs-gnu \ +// RUN: -target-cpu cortex-a8 \ +// RUN: -mfloat-abi soft \ +// RUN: -target-feature +soft-float-abi \ +// RUN: -ffreestanding \ +// RUN: -emit-llvm -w -o - %s | FileCheck %s + +#include + +// Radar 9311427: Check that alignment specifier is used in Neon load/store +// intrinsics. +typedef float AlignedAddr __attribute__ ((aligned (16))); +void t1(AlignedAddr *addr1, AlignedAddr *addr2) { +// CHECK: call <4 x float> @llvm.arm.neon.vld1.v4f32(i8* %{{.*}}, i32 16) + float32x4_t a = vld1q_f32(addr1); +// CHECK: call void @llvm.arm.neon.vst1.v4f32(i8* %{{.*}}, <4 x float> %{{.*}}, i32 16) + vst1q_f32(addr2, a); +}