1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 04:52:54 +02:00
llvm-mirror/test/CodeGen/X86/cfi-inserter-verify-inconsistent-register.mir
Petar Jovanovic 10e99900fc Add option -verify-cfiinstrs to run verifier in CFIInstrInserter
Instead of enabling it for non NDEBUG builds, use -verify-cfiinstrs to
run verifier in CFIInstrInserter. It defaults to false.

Differential Revision: https://reviews.llvm.org/D46444

llvm-svn: 331635
2018-05-07 14:09:33 +00:00

27 lines
666 B
YAML

# RUN: not llc -o - %s -mtriple=x86_64-- -verify-cfiinstrs \
# RUN: -run-pass=cfi-instr-inserter 2>&1 | FileCheck %s
# Test that CFI verifier finds inconsistent register between bb.end and one of
# its precedessors.
--- |
define void @inconsistentRegister() {
bb.end:
ret void
}
...
---
# CHECK: *** Inconsistent CFA register and/or offset between pred and succ ***
# CHECK: Succ: bb.end
# CHECK: LLVM ERROR: Found 1 in/out CFI information errors.
name: inconsistentRegister
body: |
bb.0:
CFI_INSTRUCTION def_cfa_register $rbp
JNE_1 %bb.2, implicit undef $eflags
bb.1:
CFI_INSTRUCTION def_cfa $rsp, 8
bb.2.bb.end:
RET 0
...