| # 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 | |
| ... |