1 ; RUN: llc -O2 -no-integrated-as < %s | FileCheck %s
3 ; XCore default subtarget does not support 8-byte alignment on stack.
4 ; XFAIL: target=xcore{{.*}}
6 @G = common global i32 0, align 4
8 define i32 @foo(ptr %p) nounwind uwtable {
10 %p.addr = alloca ptr, align 8
11 %rv = alloca i32, align 4
12 store ptr %p, ptr %p.addr, align 8
13 store i32 0, ptr @G, align 4
14 %0 = load ptr, ptr %p.addr, align 8
16 %1 = call i32 asm "blah", "=r,r,~{memory}"(ptr %0) nounwind
17 ; CHECK: {{[^[:alnum:]]}}G{{[^[:alnum:]]}}
18 store i32 %1, ptr %rv, align 4
19 %2 = load i32, ptr %rv, align 4
20 %3 = load i32, ptr @G, align 4
21 %add = add nsw i32 %2, %3