From 943513b79929fba1a9dccdf81cb68a41ce29cd03 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Tue, 26 Nov 2019 22:41:40 +0200 Subject: [X86] [Win64] Avoid truncating large (> 32 bit) stack allocations This fixes PR44129, which was broken in a7adc3185b (in 7.0.0 and newer). Differential Revision: https://reviews.llvm.org/D70741 --- llvm/test/CodeGen/X86/win64-stackprobe-overflow.ll | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 llvm/test/CodeGen/X86/win64-stackprobe-overflow.ll (limited to 'llvm/test/CodeGen/X86/win64-stackprobe-overflow.ll') diff --git a/llvm/test/CodeGen/X86/win64-stackprobe-overflow.ll b/llvm/test/CodeGen/X86/win64-stackprobe-overflow.ll new file mode 100644 index 00000000000..9555ce032db --- /dev/null +++ b/llvm/test/CodeGen/X86/win64-stackprobe-overflow.ll @@ -0,0 +1,14 @@ +; RUN: llc < %s -mtriple=x86_64-windows-gnu | FileCheck %s + +define void @foo() unnamed_addr #0 { +start: + %b = alloca i64, align 8 + %c = alloca [4294967295 x i8], align 1 + ret void +} + +attributes #0 = { nonlazybind uwtable "probe-stack"="probe_stack" "target-cpu"="x86-64" } + +; CHECK-LABEL: foo: +; CHECK: movabsq $4294967304, %rax +; CHECK-NEXT: callq probe_stack -- cgit v1.2.3