summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/FunctionAttrs/nonnull.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms/FunctionAttrs/nonnull.ll')
-rw-r--r--llvm/test/Transforms/FunctionAttrs/nonnull.ll17
1 files changed, 9 insertions, 8 deletions
diff --git a/llvm/test/Transforms/FunctionAttrs/nonnull.ll b/llvm/test/Transforms/FunctionAttrs/nonnull.ll
index 7e766da9d07..07c40e7d8ef 100644
--- a/llvm/test/Transforms/FunctionAttrs/nonnull.ll
+++ b/llvm/test/Transforms/FunctionAttrs/nonnull.ll
@@ -1,7 +1,8 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -functionattrs -enable-nonnull-arg-prop %s | FileCheck %s --check-prefixes=BOTH,FNATTR
-; RUN: opt -S -passes=function-attrs -enable-nonnull-arg-prop %s | FileCheck %s --check-prefixes=BOTH,FNATTR
-; RUN: opt -attributor --attributor-disable=false -attributor-max-iterations-verify -attributor-max-iterations=8 -S < %s | FileCheck %s --check-prefixes=BOTH,ATTRIBUTOR
+; RUN: opt -S -functionattrs -enable-nonnull-arg-prop %s | FileCheck %s --check-prefixes=BOTH,FNATTR,OLD
+; RUN: opt -S -passes=function-attrs -enable-nonnull-arg-prop %s | FileCheck %s --check-prefixes=BOTH,FNATTR,OLD
+; RUN: opt -attributor --attributor-disable=false -attributor-max-iterations-verify -attributor-max-iterations=7 -S < %s | FileCheck %s --check-prefixes=BOTH,OLD,ATTRIBUTOR,ATTRIBUTOR_OPM
+; RUN: opt -passes=attributor --attributor-disable=false -attributor-max-iterations-verify -attributor-max-iterations=7 -S < %s | FileCheck %s --check-prefixes=BOTH,ATTRIBUTOR,ATTRIBUTOR_NPM
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
@@ -195,16 +196,17 @@ bb4: ; preds = %bb1
%tmp5 = getelementptr inbounds i32, i32* %arg, i64 1
; ATTRIBUTOR: %tmp5b = tail call i32* @f3(i32* nonnull %tmp5)
%tmp5b = tail call i32* @f3(i32* %tmp5)
+ %tmp5c = getelementptr inbounds i32, i32* %tmp5b, i64 -1
br label %bb9
bb6: ; preds = %bb1
; FIXME: missing nonnull. It should be @f2(i32* nonnull %arg)
-; ATTRIBUTOR: %tmp7 = tail call nonnull i32* @f2(i32* readonly %arg)
+; ATTRIBUTOR: %tmp7 = tail call nonnull i32* @f2(i32* %arg)
%tmp7 = tail call i32* @f2(i32* %arg)
ret i32* %tmp7
bb9: ; preds = %bb4, %bb
- %tmp10 = phi i32* [ %tmp5, %bb4 ], [ inttoptr (i64 4 to i32*), %bb ]
+ %tmp10 = phi i32* [ %tmp5c, %bb4 ], [ inttoptr (i64 4 to i32*), %bb ]
ret i32* %tmp10
}
@@ -214,7 +216,7 @@ define internal i32* @f2(i32* %arg) {
bb:
; FIXME: missing nonnull. It should be @f1(i32* nonnull readonly %arg)
-; ATTRIBUTOR: %tmp = tail call nonnull i32* @f1(i32* readonly %arg)
+; ATTRIBUTOR: %tmp = tail call nonnull i32* @f1(i32* %arg)
%tmp = tail call i32* @f1(i32* %arg)
ret i32* %tmp
}
@@ -224,7 +226,7 @@ define dso_local noalias i32* @f3(i32* %arg) {
; ATTRIBUTOR: define dso_local noalias nonnull i32* @f3(i32* readonly %arg)
bb:
; FIXME: missing nonnull. It should be @f1(i32* nonnull readonly %arg)
-; ATTRIBUTOR: %tmp = call nonnull i32* @f1(i32* readonly %arg)
+; ATTRIBUTOR: %tmp = call nonnull i32* @f1(i32* %arg)
%tmp = call i32* @f1(i32* %arg)
ret i32* %tmp
}
@@ -578,7 +580,6 @@ define void @make_live(i32* nonnull dereferenceable(8) %a) {
ret void
}
-
;int f(int *u, int n){
; for(int i = 0;i<n;i++){
; h(u);
OpenPOWER on IntegriCloud