File: callbr-asm-outputs-indirect-isel.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 (46 lines) | stat: -rw-r--r-- 1,672 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
; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
; RUN: llc %s -o - -verify-machineinstrs \
; RUN:   -stop-after=finalize-isel -start-before=ppc-isel | FileCheck %s

target datalayout = "e-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512"
target triple = "powerpc64le-unknown-linux-gnu"

define void @strncpy_from_kernel_nofault_count() {
  ; CHECK-LABEL: name: strncpy_from_kernel_nofault_count
  ; CHECK: bb.0.entry:
  ; CHECK-NEXT:   successors: %bb.1(0x80000000), %bb.3(0x00000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   INLINEASM_BR &"", 0 /* attdialect */, 131082 /* regdef:GPRC */, def %1, 13 /* imm */, %bb.3
  ; CHECK-NEXT:   [[COPY:%[0-9]+]]:gprc = COPY %1
  ; CHECK-NEXT:   B %bb.1
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.1.asm.fallthrough:
  ; CHECK-NEXT:   successors: %bb.2(0x80000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   STB [[COPY]], 0, $zero8 :: (store (s8) into `ptr null`)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.2.Efault:
  ; CHECK-NEXT:   BLR8 implicit $lr8, implicit $rm
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.3.Efault.split (machine-block-address-taken, inlineasm-br-indirect-target):
  ; CHECK-NEXT:   successors: %bb.2(0x80000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   STB %1, 0, $zero8 :: (store (s8) into `ptr null`)
  ; CHECK-NEXT:   B %bb.2
entry:
  %0 = callbr i8 asm "", "=r,!i"()
          to label %asm.fallthrough [label %Efault.split]

asm.fallthrough:
  store i8 %0, ptr null, align 1
  br label %Efault

Efault:
  ret void

Efault.split:
  %1 = call i8 @llvm.callbr.landingpad.i8(i8 %0)
  store i8 %1, ptr null, align 1
  br label %Efault
}
declare i8 @llvm.callbr.landingpad.i8(i8)