• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
7; RUN: llc -mtriple=x86_64-linux-gnux32              -verify-machineinstrs < %s -o - | FileCheck %s --check-prefix=X32ABI
8
9define i32* @allocai32() {
10; X64-LABEL: allocai32:
11; X64:       # %bb.0:
12; X64-NEXT:    leaq -4(%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-LABEL: allocai32:
25; X32ABI:       # %bb.0:
26; X32ABI-NEXT:    leal -4(%rsp), %eax
27; X32ABI-NEXT:    retq
28  %ptr1 = alloca i32
29  ret i32* %ptr1
30}
31