xref: /llvm-project/llvm/test/CodeGen/X86/GlobalISel/frameIndex.ll (revision 2f448bf509432c1a19ec46ab8cbc7353c03c6280)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc -mtriple=x86_64-linux-gnu    -global-isel -verify-machineinstrs < %s -o - | FileCheck %s --check-prefix=X64
3; RUN: llc -mtriple=x86_64-linux-gnu                 -verify-machineinstrs < %s -o - | FileCheck %s --check-prefix=X64
4; RUN: llc -mtriple=i386-linux-gnu      -global-isel -verify-machineinstrs < %s -o - | FileCheck %s --check-prefix=X32
5; RUN: llc -mtriple=i386-linux-gnu                   -verify-machineinstrs < %s -o - | FileCheck %s --check-prefix=X32
6; RUN: llc -mtriple=x86_64-linux-gnux32 -global-isel -verify-machineinstrs < %s -o - | FileCheck %s --check-prefix=X32ABI-GISEL
7; RUN: llc -mtriple=x86_64-linux-gnux32              -verify-machineinstrs < %s -o - | FileCheck %s --check-prefix=X32ABI-SDAG
8
9define ptr @allocai32() {
10; X64-LABEL: allocai32:
11; X64:       # %bb.0:
12; X64-NEXT:    leaq -{{[0-9]+}}(%rsp), %rax
13; X64-NEXT:    retq
14;
15; X32-LABEL: allocai32:
16; X32:       # %bb.0:
17; X32-NEXT:    pushl %eax
18; X32-NEXT:    .cfi_def_cfa_offset 8
19; X32-NEXT:    movl %esp, %eax
20; X32-NEXT:    popl %ecx
21; X32-NEXT:    .cfi_def_cfa_offset 4
22; X32-NEXT:    retl
23;
24; X32ABI-GISEL-LABEL: allocai32:
25; X32ABI-GISEL:       # %bb.0:
26; X32ABI-GISEL-NEXT:    leal -{{[0-9]+}}(%rsp), %eax
27; X32ABI-GISEL-NEXT:    movl %eax, %eax
28; X32ABI-GISEL-NEXT:    retq
29;
30; X32ABI-SDAG-LABEL: allocai32:
31; X32ABI-SDAG:       # %bb.0:
32; X32ABI-SDAG-NEXT:    leal -{{[0-9]+}}(%rsp), %eax
33; X32ABI-SDAG-NEXT:    retq
34; X32ABI-LABEL: allocai32:
35; X32ABI:       # %bb.0:
36; X32ABI-NEXT:    leal -{{[0-9]+}}(%rsp), %eax
37; X32ABI-NEXT:    retq
38  %ptr1 = alloca i32
39  ret ptr %ptr1
40}
41