diff options
| author | Johannes Doerfert <jdoerfert@anl.gov> | 2019-10-13 20:40:10 +0000 |
|---|---|---|
| committer | Johannes Doerfert <jdoerfert@anl.gov> | 2019-10-13 20:40:10 +0000 |
| commit | db6efb017f246e2492ccd00613d079de96d8f705 (patch) | |
| tree | 7e3ab813fb0558cdf4ace7eb2aaa77891681ea99 /llvm/test/Transforms | |
| parent | 7a9fa897ec3539430170009d4c390518e1e78d13 (diff) | |
| download | bcm5719-llvm-db6efb017f246e2492ccd00613d079de96d8f705.tar.gz bcm5719-llvm-db6efb017f246e2492ccd00613d079de96d8f705.zip | |
[Attributor][FIX] Use check prefix that is actually tested
Summary:
This changes "CHECK" check lines to "ATTRIBUTOR" check lines where
necessary and also fixes the now exposed, mostly minor, problems.
Reviewers: sstefan1, uenoku
Subscribers: hiraditya, bollu, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68929
llvm-svn: 374735
Diffstat (limited to 'llvm/test/Transforms')
| -rw-r--r-- | llvm/test/Transforms/FunctionAttrs/arg_returned.ll | 20 | ||||
| -rw-r--r-- | llvm/test/Transforms/FunctionAttrs/dereferenceable.ll | 6 | ||||
| -rw-r--r-- | llvm/test/Transforms/FunctionAttrs/nocapture.ll | 4 |
3 files changed, 15 insertions, 15 deletions
diff --git a/llvm/test/Transforms/FunctionAttrs/arg_returned.ll b/llvm/test/Transforms/FunctionAttrs/arg_returned.ll index 99b6762a5c8..3fe960c87e6 100644 --- a/llvm/test/Transforms/FunctionAttrs/arg_returned.ll +++ b/llvm/test/Transforms/FunctionAttrs/arg_returned.ll @@ -370,11 +370,11 @@ define i32* @calls_unknown_fn(i32* %r) #0 { ; ; Verify the maybe-redefined function is not annotated: ; -; CHECK: Function Attrs: noinline nounwind uwtable -; CHECK: define linkonce_odr i32* @maybe_redefined_fn(i32* %r) +; ATTRIBUTOR: Function Attrs: noinline nounwind uwtable +; ATTRIBUTOR: define linkonce_odr i32* @maybe_redefined_fn(i32* %r) ; -; CHECK: Function Attrs: noinline nounwind uwtable -; CHECK: define i32* @calls_maybe_redefined_fn(i32* returned %r) +; ATTRIBUTOR: Function Attrs: noinline nounwind uwtable +; ATTRIBUTOR: define i32* @calls_maybe_redefined_fn(i32* returned %r) ; ; BOTH: Function Attrs: noinline nounwind uwtable ; BOTH-NEXT: define linkonce_odr i32* @maybe_redefined_fn(i32* %r) @@ -808,12 +808,12 @@ define i32 @exact(i32* %a) { %c3 = call i32* @non_exact_3(i32* %a) ; We can use the information of the weak function non_exact_3 because it was ; given to us and not derived (the alignment of the returned argument). -; CHECK: %c4 = load i32, i32* %c3, align 32 +; ATTRIBUTOR: %c4 = load i32, i32* %c3, align 32 %c4 = load i32, i32* %c3 ; FIXME: %c2 and %c3 should be replaced but not %c0 or %c1! -; CHECK: %add1 = add i32 %c0, %c1 -; CHECK: %add2 = add i32 %add1, %c2 -; CHECK: %add3 = add i32 %add2, %c3 +; ATTRIBUTOR: %add1 = add i32 %c0, %c1 +; ATTRIBUTOR: %add2 = add i32 %add1, %c2 +; ATTRIBUTOR: %add3 = add i32 %add2, %c4 %add1 = add i32 %c0, %c1 %add2 = add i32 %add1, %c2 %add3 = add i32 %add2, %c4 @@ -827,12 +827,12 @@ define i32* @ret_const() #0 { } define i32* @use_const() #0 { %c = call i32* @ret_const() - ; CHECK: ret i32* bitcast (i8* @G to i32*) + ; ATTRIBUTOR: ret i32* bitcast (i8* @G to i32*) ret i32* %c } define i32* @dont_use_const() #0 { %c = musttail call i32* @ret_const() - ; CHECK: ret i32* %c + ; ATTRIBUTOR: ret i32* %c ret i32* %c } diff --git a/llvm/test/Transforms/FunctionAttrs/dereferenceable.ll b/llvm/test/Transforms/FunctionAttrs/dereferenceable.ll index 895b0fa1145..a8608478430 100644 --- a/llvm/test/Transforms/FunctionAttrs/dereferenceable.ll +++ b/llvm/test/Transforms/FunctionAttrs/dereferenceable.ll @@ -1,4 +1,4 @@ -; RUN: opt -attributor -attributor-manifest-internal --attributor-disable=false -attributor-max-iterations-verify -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefixes=ATTRIBUTOR +; RUN: opt -attributor -attributor-manifest-internal --attributor-disable=false -attributor-max-iterations-verify -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefix=ATTRIBUTOR declare void @deref_phi_user(i32* %a); @@ -61,7 +61,7 @@ entry: for.cond: ; preds = %for.inc, %entry %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ] %a.addr.0 = phi i32* [ %a, %entry ], [ %incdec.ptr, %for.inc ] -; CHECK: call void @deref_phi_user(i32* dereferenceable(4000) %a.addr.0) +; ATTRIBUTOR: call void @deref_phi_user(i32* nonnull dereferenceable(4000) %a.addr.0) call void @deref_phi_user(i32* %a.addr.0) %tmp = load i32, i32* %a.addr.0, align 4 %cmp = icmp slt i32 %i.0, %tmp @@ -91,7 +91,7 @@ entry: for.cond: ; preds = %for.inc, %entry %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ] %a.addr.0 = phi i32* [ %a, %entry ], [ %incdec.ptr, %for.inc ] -; CHECK: call void @deref_phi_user(i32* %a.addr.0) +; ATTRIBUTOR: call void @deref_phi_user(i32* nonnull %a.addr.0) call void @deref_phi_user(i32* %a.addr.0) %tmp = load i32, i32* %a.addr.0, align 4 %cmp = icmp slt i32 %i.0, %tmp diff --git a/llvm/test/Transforms/FunctionAttrs/nocapture.ll b/llvm/test/Transforms/FunctionAttrs/nocapture.ll index fafb4178c1b..6f2699a3bdb 100644 --- a/llvm/test/Transforms/FunctionAttrs/nocapture.ll +++ b/llvm/test/Transforms/FunctionAttrs/nocapture.ll @@ -323,8 +323,8 @@ define i1 @captureDereferenceableOrNullICmp(i32* dereferenceable_or_null(4) %x) declare void @unknown(i8*) define void @test_callsite() { entry: -; We know that 'null' in AS 0 does not alias anything and cannot be captured -; CHECK: call void @unknown(i8* noalias nocapture null) +; We know that 'null' in AS 0 does not alias anything and cannot be captured. Though the latter is not qurried -> derived atm. +; ATTRIBUTOR: call void @unknown(i8* noalias null) call void @unknown(i8* null) ret void } |

