summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2024-11-14 16:28:43 -0500
committerGitHub <noreply@github.com>2024-11-14 13:28:43 -0800
commitd4e7fee97c9fa7ae2c6f069d4428964cc1ea1795 (patch)
treee06df9ef726c73cb93ab056b0ed3edde1b928f71
parent614fc7d3a01482ec6b8d48e806e2b43524212c06 (diff)
downloadbinaryen-d4e7fee97c9fa7ae2c6f069d4428964cc1ea1795.tar.gz
binaryen-d4e7fee97c9fa7ae2c6f069d4428964cc1ea1795.tar.bz2
binaryen-d4e7fee97c9fa7ae2c6f069d4428964cc1ea1795.zip
Update lit test output (#7077)
heap-store-optimization.wast had a test without its accompanying generated output.
-rw-r--r--test/lit/passes/heap-store-optimization.wast23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/lit/passes/heap-store-optimization.wast b/test/lit/passes/heap-store-optimization.wast
index 1c1abba4a..d317888be 100644
--- a/test/lit/passes/heap-store-optimization.wast
+++ b/test/lit/passes/heap-store-optimization.wast
@@ -967,6 +967,29 @@
)
)
+ ;; CHECK: (func $control-flow-in-set-value-safe-return (type $4) (result i32)
+ ;; CHECK-NEXT: (local $ref (ref null $struct))
+ ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (local.set $ref
+ ;; CHECK-NEXT: (struct.new $struct
+ ;; CHECK-NEXT: (if (result i32)
+ ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (return
+ ;; CHECK-NEXT: (i32.const 42)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (else
+ ;; CHECK-NEXT: (i32.const 42)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (struct.get $struct 0
+ ;; CHECK-NEXT: (local.get $ref)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
(func $control-flow-in-set-value-safe-return (result i32)
;; As above, but replace the call with a return in an if. We can still
;; optimize (if the return is taken, we go outside of the function anyhow).