1 ; RUN: llc -O2 < %s | FileCheck %s 2 3 @G = common global i32 0, align 4 4 5 define i32 @foo(i8* %p) nounwind uwtable { 6 entry: 7 %p.addr = alloca i8*, align 8 8 %rv = alloca i32, align 4 9 store i8* %p, i8** %p.addr, align 8 10 store i32 0, i32* @G, align 4 11 %0 = load i8** %p.addr, align 8 12 ; CHECK: blah 13 %1 = call i32 asm "blah", "=r,r,~{memory}"(i8* %0) nounwind 14 ; CHECK: @G 15 store i32 %1, i32* %rv, align 4 16 %2 = load i32* %rv, align 4 17 %3 = load i32* @G, align 4 18 %add = add nsw i32 %2, %3 19 ret i32 %add 20 } 21 22