1# REQUIRES: asserts
2# RUN: not --crash llc -o - %s -mtriple=x86_64-- \
3# RUN:     -run-pass=cfi-instr-inserter 2>&1 | FileCheck %s
4# Test that CSR being saved in multiple locations can be caught by
5# an assertion.
6--- |
7  define void @inconsistentlocs() {
8    bb.end:
9      ret void
10  }
11...
12---
13# CHECK: Different saved locations for the same CSR
14# CHECK-NEXT: UNREACHABLE executed
15name: inconsistentlocs
16body: |
17  bb.0:
18    CFI_INSTRUCTION offset $r12, -8
19    JCC_1 %bb.2, 5, implicit undef $eflags
20
21  bb.1:
22    CFI_INSTRUCTION offset $r12, -16
23
24  bb.2.bb.end:
25    RET 0
26...
27