llvm.org GIT mirror llvm / release_37 test / CodeGen / MIR / machine-function.mir
release_37

Tree @release_37 (Download .tar.gz)

machine-function.mir @release_37raw · history · blame

# RUN: llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s | FileCheck %s
# This test ensures that the MIR parser parses machine functions correctly.

--- |

  define i32 @foo() {
    ret i32 0
  }

  define i32 @bar() {
    ret i32 0
  }

  define i32 @func() {
    ret i32 0
  }

  define i32 @func2() {
    ret i32 0
  }
  
...
---
# CHECK: name: foo
# CHECK-NEXT: alignment:
# CHECK-NEXT: exposesReturnsTwice: false
# CHECK-NEXT: hasInlineAsm: false
# CHECK: ...
name:            foo
body:
  - id: 0
...
---
# CHECK: name: bar
# CHECK-NEXT: alignment:
# CHECK-NEXT: exposesReturnsTwice: false
# CHECK-NEXT: hasInlineAsm: false
# CHECK: ...
name:            bar
body:
  - id: 0
...
---
# CHECK: name: func
# CHECK-NEXT: alignment: 8
# CHECK-NEXT: exposesReturnsTwice: false
# CHECK-NEXT: hasInlineAsm: false
# CHECK: ...
name:            func
alignment:       8
body:
  - id: 0
...
---
# CHECK: name: func2
# CHECK-NEXT: alignment: 16
# CHECK-NEXT: exposesReturnsTwice: true
# CHECK-NEXT: hasInlineAsm: true
# CHECK: ...
name:            func2
alignment:       16
exposesReturnsTwice: true
hasInlineAsm:    true
body:
  - id: 0
...