llvm-6502/test/Transforms/ArgumentPromotion/2008-02-01-ReturnAttrs.ll
Bill Wendling 351b7a10e2 Use references to attribute groups on the call/invoke instructions.
Listing all of the attributes for the callee of a call/invoke instruction is way
too much and makes the IR unreadable. Use references to attributes instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175877 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-22 09:09:42 +00:00

20 lines
478 B
LLVM

; RUN: opt < %s -argpromotion -S | FileCheck %s
; CHECK: define internal i32 @deref(i32 %x.val) #0 {
define internal i32 @deref(i32* %x) nounwind {
entry:
%tmp2 = load i32* %x, align 4
ret i32 %tmp2
}
define i32 @f(i32 %x) {
entry:
%x_addr = alloca i32
store i32 %x, i32* %x_addr, align 4
; CHECK: %tmp1 = call i32 @deref(i32 %x_addr.val) [[NUW:#[0-9]+]]
%tmp1 = call i32 @deref( i32* %x_addr ) nounwind
ret i32 %tmp1
}
; CHECK: attributes [[NUW]] = { nounwind }