2018-01-23 23:48:50 +08:00
|
|
|
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
2018-05-06 05:19:59 +08:00
|
|
|
# RUN: llc -mtriple=x86_64-linux-gnu -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=CHECK
|
2018-01-23 23:48:50 +08:00
|
|
|
|
|
|
|
--- |
|
|
|
|
define i32* @allocai32() {
|
|
|
|
%ptr1 = alloca i32
|
|
|
|
ret i32* %ptr1
|
|
|
|
}
|
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: allocai32
|
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
selected: false
|
|
|
|
registers:
|
|
|
|
- { id: 0, class: gpr, preferred-register: '' }
|
|
|
|
fixedStack:
|
|
|
|
stack:
|
|
|
|
- { id: 0, name: ptr1, type: default, offset: 0, size: 4, alignment: 4,
|
2019-06-17 17:13:29 +08:00
|
|
|
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
|
2018-04-26 02:58:06 +08:00
|
|
|
debug-info-variable: '', debug-info-expression: '',
|
|
|
|
debug-info-location: '' }
|
2018-01-23 23:48:50 +08:00
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.1 (%ir-block.0):
|
|
|
|
; CHECK-LABEL: name: allocai32
|
2018-02-01 06:04:26 +08:00
|
|
|
; CHECK: [[LEA64r:%[0-9]+]]:gr64 = LEA64r %stack.0.ptr1, 1, $noreg, 0, $noreg
|
|
|
|
; CHECK: $rax = COPY [[LEA64r]]
|
|
|
|
; CHECK: RET 0, implicit $rax
|
2018-01-23 23:48:50 +08:00
|
|
|
%0:gpr(p0) = G_FRAME_INDEX %stack.0.ptr1
|
2018-02-01 06:04:26 +08:00
|
|
|
$rax = COPY %0(p0)
|
|
|
|
RET 0, implicit $rax
|
2018-01-23 23:48:50 +08:00
|
|
|
|
|
|
|
...
|