xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/2010-05-26-AsmSideEffect.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // REQUIRES: arm-registered-target
2*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -emit-llvm -triple arm-apple-darwin -o - | FileCheck %s
3*f4a2713aSLionel Sambuc // Radar 8026855
4*f4a2713aSLionel Sambuc 
test(void * src)5*f4a2713aSLionel Sambuc int test (void *src) {
6*f4a2713aSLionel Sambuc   register int w0 asm ("0");
7*f4a2713aSLionel Sambuc   // CHECK: call i32 asm "ldr $0, [$1]", "={r0}{{.*}}(i8*
8*f4a2713aSLionel Sambuc   asm ("ldr %0, [%1]": "=r" (w0): "r" (src));
9*f4a2713aSLionel Sambuc   return w0;
10*f4a2713aSLionel Sambuc }
11