summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/WebAssembly/reg-stackify.ll
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2019-01-10 23:12:07 +0000
committerHeejin Ahn <aheejin@gmail.com>2019-01-10 23:12:07 +0000
commite73c7a1ab25a484161a9951fadbd93dea4c60d60 (patch)
treef9f6d79631ff773c7e1665397e8ddca2d200d354 /llvm/test/CodeGen/WebAssembly/reg-stackify.ll
parenta82855a5d79686dcc78137506ad3ffdfc007f1ca (diff)
downloadbcm5719-llvm-e73c7a1ab25a484161a9951fadbd93dea4c60d60.tar.gz
bcm5719-llvm-e73c7a1ab25a484161a9951fadbd93dea4c60d60.zip
[WebAssembly] Fix stack pointer store check in RegStackify
Summary: We now use __stack_pointer global and global.get/global.set instruction. This fixes the checking routine for stack_pointer writes accordingly. This also fixes the existing __stack_pointer test in reg-stackify.ll: That test used to pass not because of __stack_pointer clashes but because the function `stackpointer_callee` was not marked as `readnone`, so it was assumed to possibly write to memory arbitraily, and `global.set` instruction was marked as `mayStore` in the .td definition, so they were identified as intervening writes. After we added `readnone` to its attribute, this test fails without this patch. Reviewers: dschuff, sunfish Subscribers: jgravelle-google, sbc100, llvm-commits Differential Revision: https://reviews.llvm.org/D56094 llvm-svn: 350906
Diffstat (limited to 'llvm/test/CodeGen/WebAssembly/reg-stackify.ll')
-rw-r--r--llvm/test/CodeGen/WebAssembly/reg-stackify.ll2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/WebAssembly/reg-stackify.ll b/llvm/test/CodeGen/WebAssembly/reg-stackify.ll
index 2b36ba0e3ef..6b4487bc66f 100644
--- a/llvm/test/CodeGen/WebAssembly/reg-stackify.ll
+++ b/llvm/test/CodeGen/WebAssembly/reg-stackify.ll
@@ -634,7 +634,7 @@ bb10: ; preds = %bb9, %bb
; NOREGS-LABEL: stackpointer_dependency:
; NOREGS: call stackpointer_callee@FUNCTION
; NOREGS: global.set __stack_pointer
-declare i32 @stackpointer_callee(i8* readnone, i8* readnone)
+declare i32 @stackpointer_callee(i8* readnone, i8* readnone) nounwind readnone
declare i8* @llvm.frameaddress(i32)
define i32 @stackpointer_dependency(i8* readnone) {
%2 = tail call i8* @llvm.frameaddress(i32 0)
OpenPOWER on IntegriCloud