1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 05:52:53 +02:00
llvm-mirror/test/CodeGen/MIR/X86/machine-verifier.mir
Matthias Braun 61599008e2 CodeGen: Assert that liveness is up to date when reading block live-ins.
Add an assert that checks whether liveins are up to date before they are
used.

- Do not print liveins into .mir files anymore in situations where they
  are out of date anyway.
- The assert in the RegisterScavenger is superseded by the new one in
  livein_begin().
- Skip parts of the liveness updating logic in IfConversion.cpp when
  liveness isn't tracked anymore (just enough to avoid hitting the new
  assert()).

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

llvm-svn: 291169
2017-01-05 20:01:19 +00:00

24 lines
461 B
YAML

# RUN: not llc -march=x86-64 -run-pass none -o /dev/null %s 2>&1 | FileCheck %s
# This test ensures that the MIR parser runs the machine verifier after parsing.
--- |
define i32 @inc(i32 %a) {
entry:
ret i32 %a
}
...
---
name: inc
tracksRegLiveness: true
body: |
bb.0.entry:
liveins: %edi
; CHECK: *** Bad machine code: Too few operands ***
; CHECK: instruction: COPY
; CHECK: 2 operands expected, but 0 given.
COPY
RETQ
...