[PATCH] D42292: [ARM] Call __chkstk for dynamic stack allocation in all windows environments

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 22:41:51 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL323308: [ARM] Call __chkstk for dynamic stack allocation in all windows environments (authored by mstorsjo, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D42292?vs=130597&id=131203#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D42292

Files:
  llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
  llvm/trunk/test/CodeGen/ARM/Windows/alloca.ll
  llvm/trunk/test/CodeGen/ARM/Windows/vla.ll


Index: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
===================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
@@ -949,7 +949,7 @@
   setOperationAction(ISD::STACKSAVE,          MVT::Other, Expand);
   setOperationAction(ISD::STACKRESTORE,       MVT::Other, Expand);
 
-  if (Subtarget->getTargetTriple().isWindowsItaniumEnvironment())
+  if (Subtarget->isTargetWindows())
     setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i32, Custom);
   else
     setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i32, Expand);
@@ -7956,7 +7956,7 @@
   case ISD::SDIVREM:
   case ISD::UDIVREM:       return LowerDivRem(Op, DAG);
   case ISD::DYNAMIC_STACKALLOC:
-    if (Subtarget->getTargetTriple().isWindowsItaniumEnvironment())
+    if (Subtarget->isTargetWindows())
       return LowerDYNAMIC_STACKALLOC(Op, DAG);
     llvm_unreachable("Don't know how to custom lower this!");
   case ISD::FP_ROUND: return LowerFP_ROUND(Op, DAG);
Index: llvm/trunk/test/CodeGen/ARM/Windows/alloca.ll
===================================================================
--- llvm/trunk/test/CodeGen/ARM/Windows/alloca.ll
+++ llvm/trunk/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()
 
Index: llvm/trunk/test/CodeGen/ARM/Windows/vla.ll
===================================================================
--- llvm/trunk/test/CodeGen/ARM/Windows/vla.ll
+++ llvm/trunk/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 @@
 ; CHECK-LARGE-CODE:   movt  [[IP]], :upper16:__chkstk
 ; CHECK-LARGE-CODE:   blx   [[IP]]
 ; CHECK-LARGE-CODE:   sub.w sp, sp, r4
-
-; CHECK-MSVC-NOT: __chkstk
-


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42292.131203.patch
Type: text/x-patch
Size: 2367 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180124/38efe086/attachment.bin>


More information about the llvm-commits mailing list