<div dir="ltr">Does the nonnull parameter attribute give us information about subsequent uses of that value outside of the function that has the attribute? <br><br>Example:<br><br>define i1 @bar(i32* nonnull %x) { ; %x must be non-null in this function<br>  %y = load i32, i32* %x<br>  %z = icmp ugt i32 %y, 23<br>  ret i1 %z<br>}<br><br>define i1 @foo(i32* %x) {<br>  %d = call i1 @bar(i32* %x)<br>  %null_check = icmp eq i32* %x, null ; check if null after call that guarantees non-null?<br>  br i1 %null_check, label %t, label %f<br>t:<br>  ret i1 1<br>f:<br>  ret i1 %d<br>}<br><br>$ opt  -inline  nonnull.ll -S<br>...<br>define i1 @foo(i32* %x) {<br>  %y.i = load i32, i32* %x   ; inlined and non-null knowledge is lost?<br>  %z.i = icmp ugt i32 %y.i, 23<br>  %null_check = icmp eq i32* %x, null<br>  br i1 %null_check, label %t, label %f<br><br>t:         <br>  ret i1 true<br><br>f: <br>  ret i1 %z.i<br>}<br><br></div>