llvm.org GIT mirror llvm / cbd2ff7 test / CodeGen / MIR / X86 / register-operand-class.mir
cbd2ff7

Tree @cbd2ff7 (Download .tar.gz)

register-operand-class.mir @cbd2ff7raw · history · blame

# RUN: llc -o - %s -march=x86-64 -run-pass none | FileCheck %s
# Test various aspects of register class specification on machine operands.
--- |
  define void @func() { ret void }
...
---
# CHECK-LABEL: name: func
# CHECK: registers:
# CHECK:   - { id: 0, class: gr32 }
# CHECK:   - { id: 1, class: gr64 }
# CHECK:   - { id: 2, class: gr32 }
# CHECK:   - { id: 3, class: gr16 }
# CHECK:   - { id: 4, class: _ }
name: func
body: |
  bb.0:
    %0 : gr32 = COPY %rax
    %1.sub_32bit : gr64 = COPY %eax
    %rdx = COPY %1
    %2 = COPY %ecx
    %ecx = COPY %2 : gr32

    %3 : gr16 = COPY %bx
    %bx = COPY %3 : gr16

    %4 : _(s32) = COPY %edx
...