• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2; RUN: opt -O1                   -enable-knowledge-retention -S < %s  | FileCheck %s
3; RUN: opt -passes='default<O1>' -enable-knowledge-retention -S < %s  | FileCheck %s
4
5%0 = type { %0* }
6
7define %0* @f1() local_unnamed_addr {
8; CHECK-LABEL: @f1(
9; CHECK-NEXT:  bb:
10; CHECK-NEXT:    br label [[BB3:%.*]]
11; CHECK:       bb3:
12; CHECK-NEXT:    [[I1:%.*]] = phi %0* [ [[I5:%.*]], [[BB3]] ], [ undef, [[BB:%.*]] ]
13; CHECK-NEXT:    call void @llvm.assume(i1 true) [ "nonnull"(%0* [[I1]]) ]
14; CHECK-NEXT:    [[I4:%.*]] = getelementptr inbounds [[TMP0:%.*]], %0* [[I1]], i64 0, i32 0
15; CHECK-NEXT:    [[I5]] = load %0*, %0** [[I4]], align 8
16; CHECK-NEXT:    [[I2:%.*]] = icmp eq %0* [[I5]], null
17; CHECK-NEXT:    br i1 [[I2]], label [[BB6:%.*]], label [[BB3]]
18; CHECK:       bb6:
19; CHECK-NEXT:    ret %0* undef
20;
21bb:
22  br label %bb1
23
24bb1:
25  %i = phi %0* [ undef, %bb ], [ %i5, %bb3 ]
26  %i2 = icmp eq %0* %i, null
27  br i1 %i2, label %bb6, label %bb3
28
29bb3:
30  call void @llvm.assume(i1 true) [ "nonnull"(%0* %i) ]
31  %i4 = getelementptr inbounds %0, %0* %i, i64 0, i32 0
32  %i5 = load %0*, %0** %i4, align 8
33  br label %bb1
34
35bb6:
36  ret %0* undef
37}
38
39declare void @llvm.assume(i1)
40