File: thumb2-cpsr-liveness.ll

package info (click to toggle)
llvm-toolchain-20 1%3A20.1.6-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,111,304 kB
  • sloc: cpp: 7,438,677; ansic: 1,393,822; asm: 1,012,926; python: 241,650; f90: 86,635; objc: 75,479; lisp: 42,144; pascal: 17,286; sh: 10,027; ml: 5,082; perl: 4,730; awk: 3,523; makefile: 3,349; javascript: 2,251; xml: 892; fortran: 672
file content (39 lines) | stat: -rw-r--r-- 1,512 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
; RUN: llc < %s -mtriple=thumbv7-linux-gnueabi -misched-postra=true

define i32 @test_cpsr() {
entry:
  %a = alloca [10 x i32], align 4
  br label %for.body

for.cond.cleanup:
  %c.1.reg2mem.0.lcssa = phi i32 [ %c.1.reg2mem.0, %for.inc ]
  ret i32 %c.1.reg2mem.0.lcssa

for.body:
  %0 = phi i32 [ 0, %entry ], [ %.pre, %for.inc.for.body_crit_edge ]
  %c.018.reg2mem.0 = phi i32 [ 0, %entry ], [ %c.1.reg2mem.0, %for.inc.for.body_crit_edge ]
  %b.017.reg2mem.0 = phi double [ 0.000000e+00, %entry ], [ %b.1.reg2mem.0, %for.inc.for.body_crit_edge ]
  %arrayidx.phi = phi ptr [ %a, %entry ], [ %arrayidx.inc, %for.inc.for.body_crit_edge ]
  %i.019 = phi i32 [ 0, %entry ], [ %inc, %for.inc.for.body_crit_edge ]
  %cmp1 = icmp slt i32 %0, 10
  %arrayidx.inc = getelementptr i32, ptr %arrayidx.phi, i32 1
  br i1 %cmp1, label %for.inc, label %if.end

if.end:
  %conv = sitofp i32 %i.019 to double
  %cmp2 = fcmp nsz ogt double %conv, %b.017.reg2mem.0
  %selv = select i1 %cmp2, double %conv, double %b.017.reg2mem.0
  %selv7 = select i1 %cmp2, i32 %i.019, i32 %c.018.reg2mem.0
  br label %for.inc

for.inc:
  %b.1.reg2mem.0 = phi double [ %b.017.reg2mem.0, %for.body ], [ %selv, %if.end ]
  %c.1.reg2mem.0 = phi i32 [ %c.018.reg2mem.0, %for.body ], [ %selv7, %if.end ]
  %exitcond = icmp eq i32 %i.019, 9
  br i1 %exitcond, label %for.cond.cleanup, label %for.inc.for.body_crit_edge

for.inc.for.body_crit_edge:
  %inc = add nuw nsw i32 %i.019, 1
  %.pre = load i32, ptr %arrayidx.inc, align 4
  br label %for.body
}