File: 2010-01-13-OptExtBug.ll

package info (click to toggle)
llvm-toolchain-15 1%3A15.0.6-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,554,644 kB
  • sloc: cpp: 5,922,452; ansic: 1,012,136; asm: 674,362; python: 191,568; objc: 73,855; f90: 42,327; lisp: 31,913; pascal: 11,973; javascript: 10,144; sh: 9,421; perl: 7,447; ml: 5,527; awk: 3,523; makefile: 2,520; xml: 885; cs: 573; fortran: 567
file content (43 lines) | stat: -rw-r--r-- 1,243 bytes parent folder | download | duplicates (13)
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
; RUN: llc < %s -mtriple=i386-pc-linux-gnu
; PR6027

%class.OlsonTimeZone = type { i16, ptr, ptr, i16 }

define void @XX(ptr %this) align 2 {
entry:
  %call = tail call ptr @_Z15uprv_malloc_4_2v()
  %tmp = getelementptr inbounds %class.OlsonTimeZone, ptr %this, i32 0, i32 3
  %tmp2 = load i16, ptr %tmp
  %tmp626 = load i16, ptr %this
  %cmp27 = icmp slt i16 %tmp2, %tmp626
  br i1 %cmp27, label %bb.nph, label %for.end

for.cond:
  %tmp6 = load i16, ptr %this
  %cmp = icmp slt i16 %inc, %tmp6
  %indvar.next = add i32 %indvar, 1
  br i1 %cmp, label %for.body, label %for.end

bb.nph:
  %tmp10 = getelementptr inbounds %class.OlsonTimeZone, ptr %this, i32 0, i32 2
  %tmp17 = getelementptr inbounds %class.OlsonTimeZone, ptr %this, i32 0, i32 1
  %tmp29 = sext i16 %tmp2 to i32
  %tmp31 = add i16 %tmp2, 1
  %tmp32 = zext i16 %tmp31 to i32
  br label %for.body

for.body:
  %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %for.cond ]
  %tmp30 = add i32 %indvar, %tmp29
  %tmp33 = add i32 %indvar, %tmp32
  %inc = trunc i32 %tmp33 to i16
  %tmp11 = load ptr, ptr %tmp10
  %arrayidx = getelementptr i8, ptr %tmp11, i32 %tmp30
  %tmp12 = load i8, ptr %arrayidx
  br label %for.cond

for.end:
  ret void
}

declare ptr @_Z15uprv_malloc_4_2v()