diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/lit/passes/directize-wasm64.wast | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/lit/passes/directize-wasm64.wast b/test/lit/passes/directize-wasm64.wast index 8c3a0623f..5a6b1f311 100644 --- a/test/lit/passes/directize-wasm64.wast +++ b/test/lit/passes/directize-wasm64.wast @@ -34,4 +34,18 @@ (i64.const 1) ) ) + + ;; CHECK: (func $bar-32 (param $x i32) (param $y i32) + ;; CHECK-NEXT: (unreachable) + ;; CHECK-NEXT: ) + (func $bar-32 (param $x i32) (param $y i32) + ;; As above, but the constant has 2**32 added to it. If we operate on a 32-bit + ;; index, we might think we can optimize to a call to $foo. Instead, we should + ;; see that this traps, and optimize to that. + (call_indirect (type $ii) + (local.get $x) + (local.get $y) + (i64.const 4294967297) + ) + ) ) |