55 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnux32 -verify-machineinstrs | FileCheck %s3 4target datalayout = "e-m:e-p:32:32-i64:64-f80:128-n8:16:32:64-S128"5target triple = "x86_64-unknown-linux-gnux32"6 7; probe-stack + dynamic size alloca8define void @test1(i32 %size) nounwind #0 {9; CHECK-LABEL: test1:10; CHECK: # %bb.0: # %start11; CHECK-NEXT: pushq %rbp12; CHECK-NEXT: movl %esp, %ebp13; CHECK-NEXT: # kill: def $edi killed $edi def $rdi14; CHECK-NEXT: leal 15(%rdi), %eax15; CHECK-NEXT: andl $-16, %eax16; CHECK-NEXT: callq __rust_probestack17; CHECK-NEXT: subl %eax, %esp18start:19 %alloca = alloca i8, i32 %size20 unreachable21}22 23; probe-stack + no-stack-arg-probe + dynamic size alloca24define void @test2(i32 %size) nounwind #1 {25; CHECK-LABEL: test2:26; CHECK: # %bb.0: # %start27; CHECK-NEXT: pushq %rbp28; CHECK-NEXT: movl %esp, %ebp29; CHECK-NEXT: addl $15, %edi30; CHECK-NEXT: andl $-16, %edi31; CHECK-NEXT: subl %edi, %esp32start:33 %alloca = alloca i8, i32 %size34 unreachable35}36 37; probe-stack + fixed size alloca not in entry block38define void @test3() nounwind #0 {39; CHECK-LABEL: test3:40; CHECK: # %bb.0: # %start41; CHECK-NEXT: pushq %rbp42; CHECK-NEXT: movl %esp, %ebp43; CHECK-NEXT: pushq %rax44; CHECK-NEXT: subl $1992, %esp # imm = 0x7C845start:46 br label %block47 48block:49 %alloca = alloca i8, i32 200050 unreachable51}52 53attributes #0 = { "probe-stack"="__rust_probestack" }54attributes #1 = { "probe-stack"="__rust_probestack" "no-stack-arg-probe" }55