1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
3 ; RUN: opt < %s -basic-aa -dse -S | FileCheck --check-prefix=NO-LIMIT %s
4 ; RUN: opt < %s -basic-aa -dse -dse-memoryssa-scanlimit=0 -S | FileCheck --check-prefix=LIMIT-0 %s
5 ; RUN: opt < %s -basic-aa -dse -dse-memoryssa-scanlimit=2 -S | FileCheck --check-prefix=LIMIT-2 %s
6 ; RUN: opt < %s -basic-aa -dse -dse-memoryssa-scanlimit=3 -S | FileCheck --check-prefix=LIMIT-3 %s
8 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
11 define void @test2(i32* noalias %P, i32* noalias %Q, i32* noalias %R) {
12 ; NO-LIMIT-LABEL: @test2(
13 ; NO-LIMIT-NEXT: br i1 true, label [[BB1:%.*]], label [[BB2:%.*]]
15 ; NO-LIMIT-NEXT: br label [[BB3:%.*]]
17 ; NO-LIMIT-NEXT: br label [[BB3]]
19 ; NO-LIMIT-NEXT: store i32 0, i32* [[Q:%.*]], align 4
20 ; NO-LIMIT-NEXT: store i32 0, i32* [[R:%.*]], align 4
21 ; NO-LIMIT-NEXT: store i32 0, i32* [[P:%.*]], align 4
22 ; NO-LIMIT-NEXT: ret void
24 ; LIMIT-0-LABEL: @test2(
25 ; LIMIT-0-NEXT: store i32 1, i32* [[P:%.*]], align 4
26 ; LIMIT-0-NEXT: br i1 true, label [[BB1:%.*]], label [[BB2:%.*]]
28 ; LIMIT-0-NEXT: br label [[BB3:%.*]]
30 ; LIMIT-0-NEXT: br label [[BB3]]
32 ; LIMIT-0-NEXT: store i32 0, i32* [[Q:%.*]], align 4
33 ; LIMIT-0-NEXT: store i32 0, i32* [[R:%.*]], align 4
34 ; LIMIT-0-NEXT: store i32 0, i32* [[P]], align 4
35 ; LIMIT-0-NEXT: ret void
37 ; LIMIT-2-LABEL: @test2(
38 ; LIMIT-2-NEXT: store i32 1, i32* [[P:%.*]], align 4
39 ; LIMIT-2-NEXT: br i1 true, label [[BB1:%.*]], label [[BB2:%.*]]
41 ; LIMIT-2-NEXT: br label [[BB3:%.*]]
43 ; LIMIT-2-NEXT: br label [[BB3]]
45 ; LIMIT-2-NEXT: store i32 0, i32* [[Q:%.*]], align 4
46 ; LIMIT-2-NEXT: store i32 0, i32* [[R:%.*]], align 4
47 ; LIMIT-2-NEXT: store i32 0, i32* [[P]], align 4
48 ; LIMIT-2-NEXT: ret void
50 ; LIMIT-3-LABEL: @test2(
51 ; LIMIT-3-NEXT: br i1 true, label [[BB1:%.*]], label [[BB2:%.*]]
53 ; LIMIT-3-NEXT: br label [[BB3:%.*]]
55 ; LIMIT-3-NEXT: br label [[BB3]]
57 ; LIMIT-3-NEXT: store i32 0, i32* [[Q:%.*]], align 4
58 ; LIMIT-3-NEXT: store i32 0, i32* [[R:%.*]], align 4
59 ; LIMIT-3-NEXT: store i32 0, i32* [[P:%.*]], align 4
60 ; LIMIT-3-NEXT: ret void
63 br i1 true, label %bb1, label %bb2