; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
; RUN: opt -passes='print<access-info>' -disable-output %s 2>&1 | FileCheck %s
define void @false.equal.predicate(ptr %arg, ptr %arg1, i1 %arg2) {
; CHECK-LABEL: 'false.equal.predicate'
; CHECK-NEXT: loop.body:
; CHECK-NEXT: Memory dependences are safe
; CHECK-NEXT: Dependences:
; CHECK-NEXT: Run-time memory checks:
; CHECK-NEXT: Grouped accesses:
; CHECK-EMPTY:
; CHECK-NEXT: Non vectorizable stores to invariant address were not found in loop.
; CHECK-NEXT: SCEV assumptions:
; CHECK-NEXT: Equal predicate: %load == 1
; CHECK-EMPTY:
; CHECK-NEXT: Expressions re-written:
; CHECK-NEXT: [PSE] %gep10 = getelementptr double, ptr %gep8, i64 %mul:
; CHECK-NEXT: {(8 + %arg1),+,(8 * (sext i32 %load to i64))<nsw>}<%loop.body>
; CHECK-NEXT: --> {(8 + %arg1),+,8}<%loop.body>
;
entry:
%load = load i32, ptr %arg, align 4
br i1 %arg2, label %noloop.exit, label %loop.ph
loop.ph: ; preds = %entry
%sext7 = sext i32 %load to i64
%gep8 = getelementptr i8, ptr %arg1, i64 8
br label %loop.body
loop.body: ; preds = %loop.body, %loop.ph
%phi = phi i64 [ 0, %loop.ph ], [ %add, %loop.body ]
%mul = mul i64 %phi, %sext7
%gep10 = getelementptr double, ptr %gep8, i64 %mul
%load11 = load double, ptr %gep10, align 8
store double %load11, ptr %arg1, align 8
%add = add i64 %phi, 1
%icmp = icmp eq i64 %phi, 0
br i1 %icmp, label %loop.exit, label %loop.body
noloop.exit: ; preds = %entry
%sext = sext i32 %load to i64
%gep = getelementptr double, ptr %arg1, i64 %sext
%load5 = load double, ptr %gep, align 8
store double %load5, ptr %arg, align 8
ret void
loop.exit: ; preds = %loop.body
ret void
}