llvm-6502/test/CodeGen/MIR/X86/machine-instructions.mir
Alex Lorenz f654cdae59 MIR Serialization: Introduce a lexer for machine instructions.
This commit adds a function that tokenizes the string containing
the machine instruction. This commit also adds a struct called 
'MIToken' which is used to represent the lexer's tokens.

Reviewers: Sean Silva

Differential Revision: http://reviews.llvm.org/D10521


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240323 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-22 20:37:46 +00:00

25 lines
473 B
YAML

# RUN: llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -o /dev/null %s | FileCheck %s
# This test ensures that the MIR parser parses X86 machine instructions
# correctly.
--- |
define i32 @inc(i32 %a) {
entry:
%b = mul i32 %a, 11
ret i32 %b
}
...
---
# CHECK: name: inc
name: inc
body:
- name: entry
instructions:
# CHECK: - IMUL32rri8
# CHECK-NEXT: - RETQ
- IMUL32rri8
- ' RETQ '
...