[WebAssembly] Disable the store-results optimization.
The WebAssemly spec removing the return value from store instructions, so
remove the associated optimization from LLVM.
This patch leaves the store instruction operands in place for now, so stores
now always write to "$drop"; these will be removed in a seperate patch.
llvm-svn: 279100
diff --git a/llvm/test/CodeGen/WebAssembly/offset.ll b/llvm/test/CodeGen/WebAssembly/offset.ll
index fcd8b49..b82d6ba 100644
--- a/llvm/test/CodeGen/WebAssembly/offset.ll
+++ b/llvm/test/CodeGen/WebAssembly/offset.ll
@@ -398,7 +398,8 @@
; CHECK-LABEL: aggregate_return:
; CHECK: i64.const $push[[L0:[0-9]+]]=, 0{{$}}
-; CHECK: i64.store $push[[L1:[0-9]+]]=, 8($0):p2align=2, $pop[[L0]]{{$}}
+; CHECK: i64.store $drop=, 8($0):p2align=2, $pop[[L0]]{{$}}
+; CHECK: i64.const $push[[L1:[0-9]+]]=, 0{{$}}
; CHECK: i64.store $drop=, 0($0):p2align=2, $pop[[L1]]{{$}}
define {i32,i32,i32,i32} @aggregate_return() {
ret {i32,i32,i32,i32} zeroinitializer
@@ -409,8 +410,10 @@
; CHECK-LABEL: aggregate_return_without_merge:
; CHECK: i32.const $push[[L0:[0-9]+]]=, 0{{$}}
-; CHECK: i32.store8 $push[[L1:[0-9]+]]=, 14($0), $pop[[L0]]{{$}}
-; CHECK: i32.store16 $push[[L2:[0-9]+]]=, 12($0), $pop[[L1]]{{$}}
+; CHECK: i32.store8 $drop=, 14($0), $pop[[L0]]{{$}}
+; CHECK: i32.const $push[[L1:[0-9]+]]=, 0{{$}}
+; CHECK: i32.store16 $drop=, 12($0), $pop[[L1]]{{$}}
+; CHECK: i32.const $push[[L2:[0-9]+]]=, 0{{$}}
; CHECK: i32.store $drop=, 8($0), $pop[[L2]]{{$}}
; CHECK: i64.const $push[[L3:[0-9]+]]=, 0{{$}}
; CHECK: i64.store $drop=, 0($0), $pop[[L3]]{{$}}