File: forbidden-slot-ir.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,998,520 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 (71 lines) | stat: -rw-r--r-- 1,920 bytes parent folder | download | duplicates (8)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
target triple = "mipsisa32r6el-unknown-linux-gnu"

; RUN: llc -filetype=asm %s -o - | FileCheck %s --check-prefix=MIPSELR6
; Function Attrs: noinline nounwind optnone uwtable
define i1 @foo0() nounwind {
; MIPSELR6:      bnezc	$1, $BB0_2
; MIPSELR6-NEXT: nop
; MIPSELR6:      jr	$ra
entry:
  %0 = icmp eq i32 0, 1
  br i1 %0, label %2, label %3
  ret i1 %0
2:                                                
  ret i1 %0
3:                                                
  ret i1 %0
}

define i32 @foo1() nounwind {
; MIPSELR6:      addiu	$2, $2, 1
; MIPSELR6-NEXT: .set	noreorder
; MIPSELR6-NEXT: beqzc	$2, $tmp0
; MIPSELR6-NEXT: nop
; MIPSELR6-NEXT: .set	reorder
; MIPSELR6:      jrc	$ra
entry:
  %0 = tail call i32 asm "1: addiu $0, $0, 1; beqzc $0, 1b", "=r"() nounwind
  ret i32 %0
}

define i32 @foo2() nounwind {
; MIPSELR6:      .set	push
; MIPSELR6-NEXT: .set	at
; MIPSELR6-NEXT: .set	macro
; MIPSELR6-NEXT: .set	reorder
; MIPSELR6:      .set	noreorder
; MIPSELR6-NEXT: beqzc	$9, End
; MIPSELR6-NEXT: nop
; MIPSELR6-NEXT: .set	reorder
; MIPSELR6:      addiu	$9, $9, 1
entry:
  %0 = tail call i32 asm "beqzc $$t1, End", "=r"() nounwind
  %1 = tail call i32 asm "addiu $$t1, $$t1, 1", "=r"() nounwind
  %2 = add nsw i32 %1, %0
  ret i32 %2
}

define i32 @foo3() nounwind {
; MIPSELR6:      addiu	$2, $2, 1
; MIPSELR6-NEXT: .set	noreorder
; MIPSELR6-NEXT: beqzc	$2, $tmp1
; MIPSELR6-NEXT: nop
; MIPSELR6-NEXT: .set	noreorder
; MIPSELR6-NEXT: j	End
; MIPSELR6-NEXT: nop
; MIPSELR6-NEXT: .set	reorder
entry:
  %0 = tail call i32 asm "1: addiu $0, $0, 1; beqzc $0, 1b; j End", "=r"() nounwind
  ret i32 %0
}

define i32 @foo4() nounwind {
; MIPSELR6:      addiu	$2, $2, 1
; MIPSELR6-NEXT: .set	noreorder
; MIPSELR6-NEXT: beqzc  $2, $tmp2
; MIPSELR6-NEXT: addiu	$2, $2, 1
; MIPSELR6-NEXT: .set	reorder
entry:
  %0 = tail call i32 asm "1: addiu $0, $0, 1; beqzc $0, 1b; addiu $0, $0, 1", "=r"() nounwind
  ret i32 %0
}