File: live-range-nosubreg.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 (47 lines) | stat: -rw-r--r-- 1,499 bytes parent folder | download | duplicates (14)
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
40
41
42
43
44
45
46
47
; RUN: llc < %s

; This testcase used to crash. See PR29132.

target triple = "x86_64-unknown-linux-gnu"

@a = common local_unnamed_addr global i16 0, align 2
@c = common global i32 0, align 4
@d = common local_unnamed_addr global i8 0, align 1
@b = common global i32 0, align 4

; Function Attrs: norecurse nounwind optsize uwtable
define i32 @main() local_unnamed_addr #0 {
entry:
  %0 = load volatile i32, i32* @c, align 4
  %tobool = icmp eq i32 %0, 0
  %1 = load i16, i16* @a, align 2
  br i1 %tobool, label %lor.rhs, label %lor.end

lor.rhs:                                          ; preds = %entry
  %inc = add i16 %1, 1
  store i16 %inc, i16* @a, align 2
  br label %lor.end

lor.end:                                          ; preds = %entry, %lor.rhs
  %2 = phi i16 [ %inc, %lor.rhs ], [ %1, %entry ]
  %dec = add i16 %2, -1
  store i16 %dec, i16* @a, align 2
  %3 = load i8, i8* @d, align 1
  %sub = sub i8 0, %3
  %tobool4 = icmp eq i16 %dec, 0
  br i1 %tobool4, label %land.end, label %land.rhs

land.rhs:                                         ; preds = %lor.end
  %4 = load volatile i32, i32* @b, align 4
  %tobool5 = icmp ne i32 %4, 0
  br label %land.end

land.end:                                         ; preds = %lor.end, %land.rhs
  %5 = phi i1 [ false, %lor.end ], [ %tobool5, %land.rhs ]
  %land.ext = zext i1 %5 to i8
  %or = or i8 %land.ext, %sub
  store i8 %or, i8* @d, align 1
  ret i32 0
}

attributes #0 = { norecurse nounwind optsize uwtable "target-cpu"="x86-64" }