[PATCH] D54890: [MSP430] Fix crash while lowering llvm.stacksave/stackrestore
Anton Korobeynikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 9 04:56:09 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL350710: [MSP430] Fix crash while lowering llvm.stacksave/stackrestore (authored by asl, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D54890?vs=175215&id=180818#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54890/new/
https://reviews.llvm.org/D54890
Files:
llvm/trunk/lib/Target/MSP430/MSP430ISelLowering.cpp
llvm/trunk/test/CodeGen/MSP430/stacksave_restore.ll
Index: llvm/trunk/lib/Target/MSP430/MSP430ISelLowering.cpp
===================================================================
--- llvm/trunk/lib/Target/MSP430/MSP430ISelLowering.cpp
+++ llvm/trunk/lib/Target/MSP430/MSP430ISelLowering.cpp
@@ -95,6 +95,8 @@
setOperationAction(ISD::SIGN_EXTEND, MVT::i16, Custom);
setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i8, Expand);
setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i16, Expand);
+ setOperationAction(ISD::STACKSAVE, MVT::Other, Expand);
+ setOperationAction(ISD::STACKRESTORE, MVT::Other, Expand);
setOperationAction(ISD::CTTZ, MVT::i8, Expand);
setOperationAction(ISD::CTTZ, MVT::i16, Expand);
Index: llvm/trunk/test/CodeGen/MSP430/stacksave_restore.ll
===================================================================
--- llvm/trunk/test/CodeGen/MSP430/stacksave_restore.ll
+++ llvm/trunk/test/CodeGen/MSP430/stacksave_restore.ll
@@ -0,0 +1,13 @@
+; RUN: llc < %s -march=msp430
+
+target triple = "msp430"
+
+define void @foo() {
+entry:
+ %0 = tail call i8* @llvm.stacksave()
+ tail call void @llvm.stackrestore(i8* %0)
+ ret void
+}
+
+declare i8* @llvm.stacksave()
+declare void @llvm.stackrestore(i8*)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54890.180818.patch
Type: text/x-patch
Size: 1238 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190109/7dc8b52f/attachment.bin>
More information about the llvm-commits
mailing list