1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes='loop(loop-rotate),instcombine' -enable-knowledge-retention -S < %s | FileCheck %s
6 define ptr @f1(ptr %i0) local_unnamed_addr {
9 ; CHECK: br label [[BB3:%.*]]
11 ; CHECK-NEXT: [[I1:%.*]] = phi ptr [ %i0, [[BB:%.*]] ], [ [[I5:%.*]], [[BB3]] ]
12 ; CHECK-NEXT: call void @llvm.assume(i1 true) [ "nonnull"(ptr [[I1]]) ]
13 ; CHECK-NEXT: [[I5]] = load ptr, ptr [[I1]], align 8
14 ; CHECK-NEXT: [[I2:%.*]] = icmp eq ptr [[I5]], null
15 ; CHECK-NEXT: br i1 [[I2]], label [[BB6:%.*]], label [[BB3]]
17 ; CHECK-NEXT: ret ptr undef
23 %i = phi ptr [ %i0, %bb ], [ %i5, %bb3 ]
24 %i2 = icmp eq ptr %i, null
25 br i1 %i2, label %bb6, label %bb3
28 call void @llvm.assume(i1 true) [ "nonnull"(ptr %i) ]
29 %i5 = load ptr, ptr %i, align 8
36 declare void @llvm.assume(i1)