Use references to attribute groups on the call/invoke instructions.
[oota-llvm.git] / test / Transforms / ArgumentPromotion / 2008-02-01-ReturnAttrs.ll
index 4d6a1905572ae5847d7e401419f0ae017841b136..1226b98a998edbb755ea86824057dfd9dfb6e4a7 100644 (file)
@@ -1,15 +1,19 @@
-; RUN: opt %s -argpromotion | llvm-dis | grep nounwind | count 2
+; 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           ; <i32> [#uses=1]
-       ret i32 %tmp2
+  %tmp2 = load i32* %x, align 4
+  ret i32 %tmp2
 }
 
 define i32 @f(i32 %x) {
 entry:
-       %x_addr = alloca i32            ; <i32*> [#uses=2]
-       store i32 %x, i32* %x_addr, align 4
-       %tmp1 = call i32 @deref( i32* %x_addr ) nounwind                ; <i32> [#uses=1]
-       ret i32 %tmp1
+  %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 }