File: C16-11.ll

package info (click to toggle)
llvm-2.7 2.7-6
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 59,992 kB
  • ctags: 49,499
  • sloc: cpp: 373,792; ansic: 16,885; sh: 12,614; asm: 6,809; ada: 3,083; ml: 2,942; python: 2,671; perl: 2,404; makefile: 1,691; pascal: 1,235; exp: 399; objc: 291; lisp: 184; csh: 117; xml: 38; f90: 36
file content (40 lines) | stat: -rw-r--r-- 1,249 bytes parent folder | download
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
; RUN: llc < %s -march=pic16
; XFAIL: *
; This fails because PIC16 doesn't define a (xor reg, reg) pattern.
; 

@c612.auto.a.b = internal global i1 false         ; <i1*> [#uses=2]
@c612.auto.A.b = internal global i1 false         ; <i1*> [#uses=2]

define void @c612() nounwind {
entry:
  %tmp3.b = load i1* @c612.auto.a.b               ; <i1> [#uses=1]
  %tmp3 = zext i1 %tmp3.b to i16                  ; <i16> [#uses=1]
  %tmp4.b = load i1* @c612.auto.A.b               ; <i1> [#uses=1]
  %tmp4 = select i1 %tmp4.b, i16 2, i16 0         ; <i16> [#uses=1]
  %cmp5 = icmp ne i16 %tmp3, %tmp4                ; <i1> [#uses=1]
  %conv7 = zext i1 %cmp5 to i8                    ; <i8> [#uses=1]
  tail call void @expectWrap(i8 %conv7, i8 2)
  ret void
}

define void @expectWrap(i8 %boolresult, i8 %errCode) nounwind {
entry:
  %tobool = icmp eq i8 %boolresult, 0             ; <i1> [#uses=1]
  br i1 %tobool, label %if.then, label %if.end

if.then:                                          ; preds = %entry
  tail call void @exit(i16 1)
  unreachable

if.end:                                           ; preds = %entry
  ret void
}

define i16 @main() nounwind {
entry:
  tail call void @c612()
  ret i16 0
}

declare void @exit(i16) noreturn nounwind