aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/X86/basic-block-sections-code-prefetch-call-terminates-block.ll
blob: bf98076770b5b876d8cdbb2a45bdd5311be7aa3e (plain)
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
;; Check prefetch directives properly handle a block terminating with a call.
;;
;; Specify the bb sections profile:
; RUN: echo 'v1' > %t
; RUN: echo 'f foo' >> %t
; RUN: echo 't 0,1' >> %t
;;
; RUN: llc < %s -mtriple=x86_64-pc-linux -asm-verbose=false -function-sections -basic-block-sections=%t -O1 | FileCheck %s

define i32 @foo() personality ptr @__gxx_personality_v0 {
entry:
  invoke void @explode()
          to label %continue unwind label %cleanup
; CHECK:      foo:
; CHECK:        callq explode@PLT
; CHECK-NEXT:   .globl __llvm_prefetch_target_foo_0_1
; CHECK-NEXT: __llvm_prefetch_target_foo_0_1:

continue:
  ret i32 0

cleanup:
  %res = landingpad { ptr, i32 }
          cleanup
  resume { ptr, i32 } %res
}

declare void @__gxx_personality_v0()
declare void @explode()