45 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 52; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \3; RUN: | FileCheck %s4 5; Check that the testcase does not crash the compiler.6; See https://github.com/llvm/llvm-project/issues/51512 for details.7 8define void @foo() {9; CHECK-LABEL: 'foo'10; CHECK-NEXT: Src: store i32 42, ptr %getelementptr, align 1 --> Dst: store i32 42, ptr %getelementptr, align 111; CHECK-NEXT: da analyze - consistent output [0 S]!12; CHECK-NEXT: Src: store i32 42, ptr %getelementptr, align 1 --> Dst: store i32 0, ptr %getelementptr5, align 113; CHECK-NEXT: da analyze - output [0 <=|<]!14; CHECK-NEXT: Src: store i32 0, ptr %getelementptr5, align 1 --> Dst: store i32 0, ptr %getelementptr5, align 115; CHECK-NEXT: da analyze - none!16;17bb:18 %alloca = alloca [2 x [5 x i32]], align 119 br label %outerloop.header20 21outerloop.header: ; preds = %outerloop.latch, %bb22 %iv.outerloop = phi i32 [ 0, %bb ], [ %iv.outerloop.next, %outerloop.latch ]23 %trunc = trunc i32 %iv.outerloop to i1624 %add = add i16 %trunc, 325 %getelementptr = getelementptr inbounds [2 x [5 x i32]], ptr %alloca, i16 0, i16 %trunc, i16 %add26 br label %innerloop27 28innerloop: ; preds = %innerloop, %outerloop.header29 %iv.innerloop = phi i32 [ 0, %outerloop.header ], [ %iv.innerloop.next, %innerloop ]30 store i32 42, ptr %getelementptr, align 131 %trunc4 = trunc i32 %iv.innerloop to i1632 %getelementptr5 = getelementptr inbounds [2 x [5 x i32]], ptr %alloca, i16 0, i16 %trunc4, i16 %add33 store i32 0, ptr %getelementptr5, align 134 %iv.innerloop.next = add nuw nsw i32 %iv.innerloop, 135 br i1 false, label %innerloop, label %outerloop.latch36 37outerloop.latch: ; preds = %innerloop38 %iv.outerloop.next = add nuw nsw i32 %iv.outerloop, 139 %icmp = icmp eq i32 %iv.outerloop, 040 br i1 %icmp, label %outerloop.header, label %bb941 42bb9: ; preds = %outerloop.latch43 ret void44}45