summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2018-01-24 06:40:11 +0000
committerMartin Storsjo <martin@martin.st>2018-01-24 06:40:11 +0000
commit4ed94a06ac0a4677501e4ac8e06e932dbb336876 (patch)
tree1c1486f3da25703844a6ed131f4b37b35451a7e2 /llvm/test
parente8248f2e106e8a9ab3ddcce637a15e811300cc7a (diff)
downloadbcm5719-llvm-4ed94a06ac0a4677501e4ac8e06e932dbb336876.tar.gz
bcm5719-llvm-4ed94a06ac0a4677501e4ac8e06e932dbb336876.zip
[ARM] Call __chkstk for dynamic stack allocation in all windows environments
This matches what MSVC does for alloca() function calls on ARM. Even if MSVC doesn't support VLAs at the language level, it does support the alloca function. On the clang level, both the _alloca() (when emulating MSVC, which is what the alloca() function expands to) and __builtin_alloca() builtin functions, and VLAs, map to the same LLVM IR "alloca" function - so within LLVM they're not distinguishable from each other. Differential Revision: https://reviews.llvm.org/D42292 llvm-svn: 323308
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/ARM/Windows/alloca.ll2
-rw-r--r--llvm/test/CodeGen/ARM/Windows/vla.ll5
2 files changed, 3 insertions, 4 deletions
diff --git a/llvm/test/CodeGen/ARM/Windows/alloca.ll b/llvm/test/CodeGen/ARM/Windows/alloca.ll
index 0f20ffbd36d..ea893fa9163 100644
--- a/llvm/test/CodeGen/ARM/Windows/alloca.ll
+++ b/llvm/test/CodeGen/ARM/Windows/alloca.ll
@@ -1,4 +1,6 @@
; RUN: llc -O0 -mtriple thumbv7-windows-itanium -filetype asm -o - %s | FileCheck %s
+; RUN: llc -O0 -mtriple thumbv7-windows-msvc -filetype asm -o - %s | FileCheck %s
+; RUN: llc -O0 -mtriple thumbv7-windows-mingw32 -filetype asm -o - %s | FileCheck %s
declare arm_aapcs_vfpcc i32 @num_entries()
diff --git a/llvm/test/CodeGen/ARM/Windows/vla.ll b/llvm/test/CodeGen/ARM/Windows/vla.ll
index 1c0632e25e5..03709758048 100644
--- a/llvm/test/CodeGen/ARM/Windows/vla.ll
+++ b/llvm/test/CodeGen/ARM/Windows/vla.ll
@@ -3,7 +3,7 @@
; RUN: llc -mtriple=thumbv7-windows-itanium -mcpu=cortex-a9 -code-model=large -o - %s \
; RUN: | FileCheck %s -check-prefix CHECK-LARGE-CODE
; RUN: llc -mtriple=thumbv7-windows-msvc -mcpu=cortex-a9 -o - %s \
-; RUN: | FileCheck %s -check-prefix CHECK-MSVC
+; RUN: | FileCheck %s -check-prefix CHECK-SMALL-CODE
define arm_aapcs_vfpcc i8 @function(i32 %sz, i32 %idx) {
entry:
@@ -26,6 +26,3 @@ entry:
; CHECK-LARGE-CODE: movt [[IP]], :upper16:__chkstk
; CHECK-LARGE-CODE: blx [[IP]]
; CHECK-LARGE-CODE: sub.w sp, sp, r4
-
-; CHECK-MSVC-NOT: __chkstk
-
OpenPOWER on IntegriCloud