File: unsafe-in-forbidden-slot.ll

package info (click to toggle)
llvm-toolchain-9 1%3A9.0.1-16
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 882,436 kB
  • sloc: cpp: 4,167,636; ansic: 714,256; asm: 457,610; python: 155,927; objc: 65,094; sh: 42,856; lisp: 26,908; perl: 7,786; pascal: 7,722; makefile: 6,881; ml: 5,581; awk: 3,648; cs: 2,027; xml: 888; javascript: 381; ruby: 156
file content (34 lines) | stat: -rw-r--r-- 890 bytes parent folder | download | duplicates (16)
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
; RUN: llc -march=mips64el -O0 -mcpu=mips64r6 < %s | FileCheck %s
; RUN: llc -march=mips64 -O0 -mcpu=mips64r6 < %s | FileCheck %s

@boo = global i32 0, align 4

; Function Attrs: nounwind
define void @_Z3foov() #0 {
entry:
  %0 = load volatile i32, i32* @boo, align 4
  switch i32 %0, label %sw.epilog [
    i32 0, label %sw.bb
    i32 1, label %sw.bb1
    i32 2, label %sw.bb1
  ]

sw.bb:                                            ; preds = %entry
  store volatile i32 1, i32* @boo, align 4
  br label %sw.epilog
; CHECK: beqzc
; CHECK-NEXT: nop
; CHECK-NEXT: .LBB
; CHECK-NEXT: j

sw.bb1:                                           ; preds = %entry, %entry
  store volatile i32 2, i32* @boo, align 4
  br label %sw.epilog
; CHECK: bnezc
; CHECK-NEXT: nop
; CHECK-NEXT: .LBB
; CHECK-NEXT: j

sw.epilog:                                        ; preds = %entry, %sw.bb1, %sw.bb
  ret void
}