[cfe-commits] r129979 - /cfe/trunk/test/CodeGen/arm-vector-align.c

Bob Wilson bob.wilson at apple.com
Thu Apr 21 21:06:49 PDT 2011


Author: bwilson
Date: Thu Apr 21 23:06:49 2011
New Revision: 129979

URL: http://llvm.org/viewvc/llvm-project?rev=129979&view=rev
Log:
Add a testcase for svn r129964 (Neon load/store intrinsic alignments).

Added:
    cfe/trunk/test/CodeGen/arm-vector-align.c

Added: cfe/trunk/test/CodeGen/arm-vector-align.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/arm-vector-align.c?rev=129979&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/arm-vector-align.c (added)
+++ cfe/trunk/test/CodeGen/arm-vector-align.c Thu Apr 21 23:06:49 2011
@@ -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 <arm_neon.h>
+
+// 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);
+}





More information about the cfe-commits mailing list