1 ; RUN: opt < %s -functionattrs -S | FileCheck %s 2 3 ; CHECK: define i32* @a(i32** nocapture readonly %p) 4 define i32* @a(i32** %p) { 5 %tmp = load i32*, i32** %p 6 ret i32* %tmp 7 } 8 9 ; CHECK: define i32* @b(i32* %q) 10 define i32* @b(i32 *%q) { 11 %mem = alloca i32* 12 store i32* %q, i32** %mem 13 %tmp = call i32* @a(i32** %mem) 14 ret i32* %tmp 15 } 16 17 ; CHECK: define i32* @c(i32* readnone %r) 18 @g = global i32 0 19 define i32* @c(i32 *%r) { 20 %a = icmp eq i32* %r, null 21 store i32 1, i32* @g 22 ret i32* %r 23 } 24