2016-07-14 04:36:03 +08:00
|
|
|
# RUN: llc -mtriple=x86_64-apple-darwin -stop-after branch-folder -start-after branch-folder -o - %s | FileCheck %s
|
2015-08-11 05:47:36 +08:00
|
|
|
# This test verifies that the machine verifier won't report an error when
|
|
|
|
# verifying the PATCHPOINT instruction.
|
|
|
|
|
|
|
|
--- |
|
|
|
|
|
|
|
|
define void @small_patchpoint_codegen(i64 %p1, i64 %p2, i64 %p3, i64 %p4) {
|
|
|
|
entry:
|
|
|
|
%result = tail call i64 (i64, i32, i8*, i32, ...) @llvm.experimental.patchpoint.i64(i64 5, i32 5, i8* null, i32 2, i64 %p1, i64 %p2)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i64 @llvm.experimental.patchpoint.i64(i64, i32, i8*, i32, ...)
|
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: small_patchpoint_codegen
|
|
|
|
tracksRegLiveness: true
|
|
|
|
liveins:
|
2018-02-01 06:04:26 +08:00
|
|
|
- { reg: '$rdi' }
|
|
|
|
- { reg: '$rsi' }
|
2015-08-11 05:47:36 +08:00
|
|
|
frameInfo:
|
|
|
|
hasPatchPoint: true
|
|
|
|
stackSize: 8
|
|
|
|
adjustsStack: true
|
|
|
|
hasCalls: true
|
|
|
|
fixedStack:
|
|
|
|
- { id: 0, type: spill-slot, offset: -16, size: 8, alignment: 16 }
|
2015-08-14 07:10:16 +08:00
|
|
|
body: |
|
|
|
|
bb.0.entry:
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $rdi, $rsi, $rbp
|
2015-08-14 07:10:16 +08:00
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
frame-setup PUSH64r killed $rbp, implicit-def $rsp, implicit $rsp
|
2016-07-27 02:20:00 +08:00
|
|
|
CFI_INSTRUCTION def_cfa_offset 16
|
2018-02-01 06:04:26 +08:00
|
|
|
CFI_INSTRUCTION offset $rbp, -16
|
|
|
|
$rbp = frame-setup MOV64rr $rsp
|
|
|
|
CFI_INSTRUCTION def_cfa_register $rbp
|
|
|
|
; CHECK: PATCHPOINT 5, 5, 0, 2, 0, $rdi, $rsi, csr_64, implicit-def dead early-clobber $r11, implicit-def $rsp, implicit-def dead $rax
|
|
|
|
PATCHPOINT 5, 5, 0, 2, 0, $rdi, $rsi, csr_64, implicit-def dead early-clobber $r11, implicit-def $rsp, implicit-def dead $rax
|
|
|
|
$rbp = POP64r implicit-def $rsp, implicit $rsp
|
2015-08-14 07:10:16 +08:00
|
|
|
RETQ
|
2015-08-11 05:47:36 +08:00
|
|
|
...
|