File: d83507-knowledge-retention-bug.ll

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (39 lines) | stat: -rw-r--r-- 1,266 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -loop-rotate -instcombine -enable-knowledge-retention -S < %s  | FileCheck %s
; RUN: opt -passes='loop(loop-rotate),instcombine' -enable-knowledge-retention -S < %s  | FileCheck %s

%0 = type { %0* }

define %0* @f1(%0* %i0) local_unnamed_addr {
; CHECK-LABEL: @f1(
; CHECK-NEXT:  bb:
; CHECK:         br label [[BB3:%.*]]
; CHECK:       bb3:
; CHECK-NEXT:    [[I1:%.*]] = phi %0* [ %i0, [[BB:%.*]] ], [ [[I5:%.*]], [[BB3]] ]
; CHECK-NEXT:    call void @llvm.assume(i1 true) [ "nonnull"(%0* [[I1]]) ]
; CHECK-NEXT:    [[I4:%.*]] = getelementptr inbounds [[TMP0:%.*]], %0* [[I1]], i64 0, i32 0
; CHECK-NEXT:    [[I5]] = load %0*, %0** [[I4]], align 8
; CHECK-NEXT:    [[I2:%.*]] = icmp eq %0* [[I5]], null
; CHECK-NEXT:    br i1 [[I2]], label [[BB6:%.*]], label [[BB3]]
; CHECK:       bb6:
; CHECK-NEXT:    ret %0* undef
;
bb:
  br label %bb1

bb1:
  %i = phi %0* [ %i0, %bb ], [ %i5, %bb3 ]
  %i2 = icmp eq %0* %i, null
  br i1 %i2, label %bb6, label %bb3

bb3:
  call void @llvm.assume(i1 true) [ "nonnull"(%0* %i) ]
  %i4 = getelementptr inbounds %0, %0* %i, i64 0, i32 0
  %i5 = load %0*, %0** %i4, align 8
  br label %bb1

bb6:
  ret %0* undef
}

declare void @llvm.assume(i1)