llvm/llvm/test/CodeGen/X86/clobber_frame_ptr_x32.ll

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
; RUN: llc < %s | FileCheck %s

target triple = "x86_64-linux-gnux32"

define i32 @foo() {
; CHECK-LABEL: foo:
; CHECK:       # %bb.0: # %entry
; CHECK-NEXT:    pushq %rbp
; CHECK-NEXT:    .cfi_def_cfa_offset 16
; CHECK-NEXT:    .cfi_offset %rbp, -16
; CHECK-NEXT:    movq %rsp, %rbp
; CHECK-NEXT:    .cfi_def_cfa_register %rbp
; CHECK-NEXT:    subq $16, %rsp
; CHECK-NEXT:    movl $4, -8(%rbp)
; CHECK-NEXT:    movl $5, -4(%rbp)
; CHECK-NEXT:    movl -8(%rbp), %eax
; CHECK-NEXT:    movq %rsp, %rcx
; CHECK-NEXT:    addq $15, %rax
; CHECK-NEXT:    andq $-16, %rax
; CHECK-NEXT:    movq %rcx, %rdx
; CHECK-NEXT:    subq %rax, %rdx
; CHECK-NEXT:    movq %rdx, %rsp
; CHECK-NEXT:    negq %rax
; CHECK-NEXT:    movl $1, (%rcx,%rax)
; CHECK-NEXT:    pushq %rbp
; CHECK-NEXT:    pushq %rax
; CHECK-NEXT:    .cfi_remember_state
; CHECK-NEXT:    .cfi_escape 0x0f, 0x06, 0x77, 0x08, 0x06, 0x11, 0x10, 0x22 #
; CHECK-NEXT:    movl $123, %ebp
; CHECK-NEXT:    #APP
; CHECK-NEXT:    nop
; CHECK-NEXT:    #NO_APP
; CHECK-NEXT:    addq $8, %rsp
; CHECK-NEXT:    popq %rbp
; CHECK-NEXT:    .cfi_restore_state
; CHECK-NEXT:    movl -4(%rbp), %eax
; CHECK-NEXT:    movq %rbp, %rsp
; CHECK-NEXT:    popq %rbp
; CHECK-NEXT:    .cfi_def_cfa %rsp, 8
; CHECK-NEXT:    retq
entry:
  %size = alloca i32, align 4
  %g = alloca i32, align 4
  store volatile i32 4, ptr %size, align 4
  store volatile i32 5, ptr %g, align 4
  %len = load volatile i32, ptr %size, align 4
  %var_array = alloca i8, i32 %len, align 16
  store i32 1, ptr %var_array, align 16
  call void asm "nop", "{ebp},~{memory}"(i32 123)
  %retval = load i32, ptr %g, align 4
  ret i32 %retval
}