65 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -aa-pipeline=basic-aa -passes="gvn" -S %s | FileCheck --check-prefixes=CHECK,LIMIT %s3; RUN: opt -aa-pipeline=basic-aa -passes="gvn" -S -capture-tracking-max-uses-to-explore=20 %s | FileCheck --check-prefixes=CHECK,LIMIT-TOO-SMALL %s4; RUN: opt -aa-pipeline=basic-aa -passes="gvn" -S -capture-tracking-max-uses-to-explore=21 %s | FileCheck --check-prefixes=CHECK,LIMIT %s5 6define i32 @test1(ptr %p, i1 %C) {7; CHECK-LABEL: @test1(8; CHECK-NEXT: entry:9; CHECK-NEXT: [[A:%.*]] = alloca i32, align 410; CHECK-NEXT: call void @dont_capture(ptr [[A]])11; CHECK-NEXT: call void @dont_capture(ptr [[A]])12; CHECK-NEXT: call void @dont_capture(ptr [[A]])13; CHECK-NEXT: call void @dont_capture(ptr [[A]])14; CHECK-NEXT: call void @dont_capture(ptr [[A]])15; CHECK-NEXT: call void @dont_capture(ptr [[A]])16; CHECK-NEXT: call void @dont_capture(ptr [[A]])17; CHECK-NEXT: call void @dont_capture(ptr [[A]])18; CHECK-NEXT: call void @dont_capture(ptr [[A]])19; CHECK-NEXT: call void @dont_capture(ptr [[A]])20; CHECK-NEXT: call void @dont_capture(ptr [[A]])21; CHECK-NEXT: call void @dont_capture(ptr [[A]])22; CHECK-NEXT: call void @dont_capture(ptr [[A]])23; CHECK-NEXT: call void @dont_capture(ptr [[A]])24; CHECK-NEXT: call void @dont_capture(ptr [[A]])25; CHECK-NEXT: call void @dont_capture(ptr [[A]])26; CHECK-NEXT: call void @dont_capture(ptr [[A]])27; CHECK-NEXT: call void @dont_capture(ptr [[A]])28; CHECK-NEXT: call void @dont_capture(ptr [[A]])29; CHECK-NEXT: store i32 1, ptr [[A]], align 430; CHECK-NEXT: call void @may_write()31; LIMIT-TOO-SMALL-NEXT: [[L:%.*]] = load i32, ptr [[A]], align 432; LIMIT-TOO-SMALL-NEXT: ret i32 [[L]]33; LIMIT-NEXT: ret i32 134;35entry:36 %a = alloca i3237 call void @dont_capture(ptr %a)38 call void @dont_capture(ptr %a)39 call void @dont_capture(ptr %a)40 call void @dont_capture(ptr %a)41 call void @dont_capture(ptr %a)42 call void @dont_capture(ptr %a)43 call void @dont_capture(ptr %a)44 call void @dont_capture(ptr %a)45 call void @dont_capture(ptr %a)46 call void @dont_capture(ptr %a)47 call void @dont_capture(ptr %a)48 call void @dont_capture(ptr %a)49 call void @dont_capture(ptr %a)50 call void @dont_capture(ptr %a)51 call void @dont_capture(ptr %a)52 call void @dont_capture(ptr %a)53 call void @dont_capture(ptr %a)54 call void @dont_capture(ptr %a)55 call void @dont_capture(ptr %a)56 store i32 1, ptr %a57 call void @may_write()58 %l = load i32, ptr %a59 ret i32 %l60}61 62declare void @dont_capture(ptr nocapture)63 64declare void @may_write()65