File: pr84709.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 1,998,492 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (34 lines) | stat: -rw-r--r-- 856 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
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
; RUN: opt -S -passes=loop-reduce < %s | FileCheck %s

; Make sure it does not assert.
define i64 @test() {
; CHECK-LABEL: define i64 @test() {
; CHECK-NEXT:  bb:
; CHECK-NEXT:    br label [[BB1:%.*]]
; CHECK:       bb1:
; CHECK-NEXT:    br label [[BB2:%.*]]
; CHECK:       bb2:
; CHECK-NEXT:    br i1 true, label [[BB5:%.*]], label [[BB2]]
; CHECK:       bb5:
; CHECK-NEXT:    br label [[BB1]]
;
bb:
  br label %bb1

bb1:
  %phi = phi i8 [ %zext6, %bb5 ], [ 0, %bb ]
  br label %bb2

bb2:
  %phi3 = phi i8 [ %add, %bb2 ], [ %phi, %bb1 ]
  %phi4 = phi i32 [ 0, %bb2 ], [ 1, %bb1 ]
  %add = add i8 %phi3, 1
  br i1 true, label %bb5, label %bb2

bb5:
  %zext = zext i8 %add to i32
  %icmp = icmp sge i32 %phi4, 0
  %zext6 = zext i1 %icmp to i8
  br label %bb1
}