73 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 62; RUN: opt < %s -disable-output "-passes=print<da>" 2>&1 \3; RUN: | FileCheck %s --check-prefixes=CHECK,CHECK-ALL4; RUN: opt < %s -disable-output "-passes=print<da>" -da-enable-dependence-test=strong-siv 2>&1 \5; RUN: | FileCheck %s --check-prefixes=CHECK,CHECK-STRONG-SIV6 7; for (i = 0; i < (1LL << 62); i++) {8; if (0 <= 2*i - 2)9; A[2*i - 2] = 1;10;11; if (0 <= 2*i - 4)12; A[2*i - 4] = 2;13; }14;15; FIXME: DependenceAnalysis fails to detect the dependency between the two16; stores, and the issue is not caused by the Strong SIV.17define void @strongsiv_const_ovfl(ptr %A) {18; CHECK-ALL-LABEL: 'strongsiv_const_ovfl'19; CHECK-ALL-NEXT: Src: store i8 1, ptr %gep.0, align 1 --> Dst: store i8 1, ptr %gep.0, align 120; CHECK-ALL-NEXT: da analyze - none!21; CHECK-ALL-NEXT: Src: store i8 1, ptr %gep.0, align 1 --> Dst: store i8 2, ptr %gep.1, align 122; CHECK-ALL-NEXT: da analyze - none!23; CHECK-ALL-NEXT: Src: store i8 2, ptr %gep.1, align 1 --> Dst: store i8 2, ptr %gep.1, align 124; CHECK-ALL-NEXT: da analyze - none!25;26; CHECK-STRONG-SIV-LABEL: 'strongsiv_const_ovfl'27; CHECK-STRONG-SIV-NEXT: Src: store i8 1, ptr %gep.0, align 1 --> Dst: store i8 1, ptr %gep.0, align 128; CHECK-STRONG-SIV-NEXT: da analyze - none!29; CHECK-STRONG-SIV-NEXT: Src: store i8 1, ptr %gep.0, align 1 --> Dst: store i8 2, ptr %gep.1, align 130; CHECK-STRONG-SIV-NEXT: da analyze - consistent output [1]!31; CHECK-STRONG-SIV-NEXT: Src: store i8 2, ptr %gep.1, align 1 --> Dst: store i8 2, ptr %gep.1, align 132; CHECK-STRONG-SIV-NEXT: da analyze - none!33;34entry:35 br label %loop.header36 37loop.header:38 %i = phi i64 [ 0, %entry ], [ %i.inc, %loop.latch ]39 %offset.0 = phi i64 [ -2, %entry ], [ %offset.0.next, %loop.latch ]40 %offset.1 = phi i64 [ -4, %entry ], [ %offset.1.next, %loop.latch ]41 %ec = icmp eq i64 %i, 461168601842738790442 br i1 %ec, label %exit, label %loop.body43 44loop.body:45 %cond.0 = icmp sge i64 %offset.0, 046 %cond.1 = icmp sge i64 %offset.1, 047 br i1 %cond.0, label %if.then.0, label %loop.middle48 49if.then.0:50 %gep.0 = getelementptr inbounds i8, ptr %A, i64 %offset.051 store i8 1, ptr %gep.052 br label %loop.middle53 54loop.middle:55 br i1 %cond.1, label %if.then.1, label %loop.latch56 57if.then.1:58 %gep.1 = getelementptr inbounds i8, ptr %A, i64 %offset.159 store i8 2, ptr %gep.160 br label %loop.latch61 62loop.latch:63 %i.inc = add nuw nsw i64 %i, 164 %offset.0.next = add nsw i64 %offset.0, 265 %offset.1.next = add nsw i64 %offset.1, 266 br label %loop.header67 68exit:69 ret void70}71;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:72; CHECK: {{.*}}73