llvm/llvm/test/CodeGen/MIR/AArch64/function-info-noredzone-present.mir

# RUN: llc -mtriple=aarch64--- --verify-machineinstrs -simplify-mir -run-pass none %s -o - | FileCheck %s

# This test checks for persistence of the hasRedZone attribute through a
# llc transformation that shouldn't do anything

# CHECK-NAME: name:            foo
# CHECK-LABEL: machineFunctionInfo: {}

---
name:            foo
alignment:       4
tracksRegLiveness: true
frameInfo:
  maxAlignment:    1
  maxCallFrameSize: 0
machineFunctionInfo: {}
body:             |
  bb.0.entry:
    RET_ReallyLR

...

# CHECK-LABEL: name:            bar
# CHECK: machineFunctionInfo:
# CHECK-NEXT: hasRedZone:      false

---
name:            bar
alignment:       4
tracksRegLiveness: true
frameInfo:
  maxAlignment:    1
  maxCallFrameSize: 0
machineFunctionInfo:
  hasRedZone:      false
body:             |
  bb.0:
    RET_ReallyLR

...

# CHECK-LABEL: name:            baz
# CHECK: machineFunctionInfo:
# CHECK-NEXT: hasRedZone:      true

---
name:            baz
alignment:       4
tracksRegLiveness: true
frameInfo:
  maxAlignment:    1
  maxCallFrameSize: 0
machineFunctionInfo:
  hasRedZone:      true
body:             |
  bb.0.entry:
    RET_ReallyLR

...