| ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 6 |
| ; RUN: opt -passes='print<access-info>' -disable-output %s 2>&1 | FileCheck %s |
| |
| target datalayout = "po1:64:64" |
| |
| ; Tests with an address space that has an all-ones nullptr. |
| |
| ; The step is negative and evaluating at the symbolic max BTC may wrap, so the |
| ; lowest accessed address is unknown and no runtime checks can be formed. |
| define void @negative_step_all_ones_null(ptr addrspace(1) %P, ptr addrspace(1) %S) { |
| ; CHECK-LABEL: 'negative_step_all_ones_null' |
| ; CHECK-NEXT: loop: |
| ; CHECK-NEXT: Memory dependences are safe with run-time checks |
| ; CHECK-NEXT: Dependences: |
| ; CHECK-NEXT: Run-time memory checks: |
| ; CHECK-NEXT: Check 0: |
| ; CHECK-NEXT: Comparing group GRP0: |
| ; CHECK-NEXT: %ptr.iv = phi ptr addrspace(1) [ %P, %entry ], [ %ptr.iv.next, %loop ] |
| ; CHECK-NEXT: Against group GRP1: |
| ; CHECK-NEXT: ptr addrspace(1) %S |
| ; CHECK-NEXT: Grouped accesses: |
| ; CHECK-NEXT: Group GRP0: |
| ; CHECK-NEXT: (Low: (-4 + inttoptr (i64 -1 to ptr addrspace(1)))<nsw> High: (4 + %P)) |
| ; CHECK-NEXT: Member: {%P,+,-4}<nw><%loop> |
| ; CHECK-NEXT: Group GRP1: |
| ; CHECK-NEXT: (Low: %S High: (4 + %S)) |
| ; CHECK-NEXT: Member: %S |
| ; CHECK-EMPTY: |
| ; CHECK-NEXT: Non vectorizable stores to invariant address were not found in loop. |
| ; CHECK-NEXT: SCEV assumptions: |
| ; CHECK-EMPTY: |
| ; CHECK-NEXT: Expressions re-written: |
| ; |
| entry: |
| br label %loop |
| |
| loop: |
| %iv = phi i32 [ 0, %entry ], [ %iv.next, %loop ] |
| %ptr.iv = phi ptr addrspace(1) [ %P, %entry ], [ %ptr.iv.next, %loop ] |
| %l = load i32, ptr addrspace(1) %S |
| store i32 %l, ptr addrspace(1) %ptr.iv, align 4 |
| %ptr.iv.next = getelementptr inbounds i8, ptr addrspace(1) %ptr.iv, i32 -4 |
| %iv.next = add nsw i32 %iv, 1 |
| %c.2 = icmp slt i32 %iv.next, %l |
| br i1 %c.2, label %loop, label %exit |
| |
| exit: |
| ret void |
| } |