Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/Transforms/Attributor/noalias.ll
Show First 20 Lines • Show All 162 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
; TEST 10 | ; TEST 10 | ||||
; Simple CallSite Test | ; Simple CallSite Test | ||||
declare void @test10_helper_1(i8* %a) | declare void @test10_helper_1(i8* %a) | ||||
define void @test10_helper_2(i8* noalias %a) { | define void @test10_helper_2(i8* noalias %a) { | ||||
; CHECK: tail call void @test10_helper_1(i8* %a) | ; CHECK: tail call void @test10_helper_1(i8* noalias %a) | ||||
tail call void @test10_helper_1(i8* %a) | tail call void @test10_helper_1(i8* %a) | ||||
ret void | ret void | ||||
} | } | ||||
define void @test10(i8* noalias %a) { | define void @test10(i8* noalias %a) { | ||||
; CHECK: define void @test10(i8* noalias %a) | ; CHECK: define void @test10(i8* noalias %a) | ||||
; FIXME: missing noalias | ; FIXME: missing noalias | ||||
; CHECK-NEXT: tail call void @test10_helper_1(i8* %a) | ; CHECK-NEXT: tail call void @test10_helper_1(i8* noalias %a) | ||||
tail call void @test10_helper_1(i8* %a) | tail call void @test10_helper_1(i8* %a) | ||||
; CHECK-NEXT: tail call void @test10_helper_2(i8* noalias %a) | ; CHECK-NEXT: tail call void @test10_helper_2(i8* noalias %a) | ||||
tail call void @test10_helper_2(i8* %a) | tail call void @test10_helper_2(i8* %a) | ||||
ret void | ret void | ||||
} | } | ||||
; TEST 11 | ; TEST 11 | ||||
Show All 30 Lines | ; | ||||
tail call void @use_nocapture(i8* %B) | tail call void @use_nocapture(i8* %B) | ||||
ret void | ret void | ||||
} | } | ||||
define void @test12_2(){ | define void @test12_2(){ | ||||
; CHECK-LABEL: @test12_2( | ; CHECK-LABEL: @test12_2( | ||||
; CHECK-NEXT: [[A:%.*]] = tail call noalias i8* @malloc(i64 4) | ; CHECK-NEXT: [[A:%.*]] = tail call noalias i8* @malloc(i64 4) | ||||
; FIXME: This should be @use_nocapture(i8* noalias [[A]]) | ; FIXME: This should be @use_nocapture(i8* noalias [[A]]) | ||||
; CHECK-NEXT: tail call void @use_nocapture(i8* nocapture [[A]]) | ; CHECK-NEXT: tail call void @use_nocapture(i8* noalias nocapture [[A]]) | ||||
; FIXME: This should be @use_nocapture(i8* noalias nocapture [[A]]) | ; FIXME: This should be @use_nocapture(i8* noalias nocapture [[A]]) | ||||
; CHECK-NEXT: tail call void @use_nocapture(i8* nocapture [[A]]) | ; CHECK-NEXT: tail call void @use_nocapture(i8* noalias nocapture [[A]]) | ||||
; CHECK-NEXT: tail call void @use(i8* [[A]]) | ; CHECK-NEXT: tail call void @use(i8* noalias [[A]]) | ||||
; CHECK-NEXT: tail call void @use_nocapture(i8* nocapture [[A]]) | ; CHECK-NEXT: tail call void @use_nocapture(i8* noalias nocapture [[A]]) | ||||
jdoerfert: The last use should not be `noalias` because the on before is not `nocapure`! | |||||
pgodeAuthorUnsubmitted Not Done ReplyInline ActionsI am not sure if this case is applicable for noalias propagation. pgode: I am not sure if this case is applicable for noalias propagation. | |||||
; CHECK-NEXT: ret void | ; CHECK-NEXT: ret void | ||||
; | ; | ||||
%A = tail call noalias i8* @malloc(i64 4) | %A = tail call noalias i8* @malloc(i64 4) | ||||
tail call void @use_nocapture(i8* %A) | tail call void @use_nocapture(i8* %A) | ||||
tail call void @use_nocapture(i8* %A) | tail call void @use_nocapture(i8* %A) | ||||
tail call void @use(i8* %A) | tail call void @use(i8* %A) | ||||
tail call void @use_nocapture(i8* %A) | tail call void @use_nocapture(i8* %A) | ||||
ret void | ret void | ||||
Show All 33 Lines |
The last use should not be noalias because the on before is not nocapure!