diff options
author | Alon Zakai <alonzakai@gmail.com> | 2018-09-20 12:26:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-20 12:26:10 -0700 |
commit | ad9152e4973afa83d093600dda0d925f5c7cf714 (patch) | |
tree | 9d53ec339456fa417d1bd4776152bdb75b109522 /src/passes/I64ToI32Lowering.cpp | |
parent | 41ebb1b11041bf43f0e8b7ebacbed132511fcc55 (diff) | |
download | binaryen-ad9152e4973afa83d093600dda0d925f5c7cf714.tar.gz binaryen-ad9152e4973afa83d093600dda0d925f5c7cf714.tar.bz2 binaryen-ad9152e4973afa83d093600dda0d925f5c7cf714.zip |
More #1678 fixes (#1685)
While debugging to fix the waterfall regressions I noticed that wasm-reduce regressed. We need to be more careful with visitFunction which now may visit an imported function - I found a few not-well-tested passes that also regressed that way.
Diffstat (limited to 'src/passes/I64ToI32Lowering.cpp')
-rw-r--r-- | src/passes/I64ToI32Lowering.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/passes/I64ToI32Lowering.cpp b/src/passes/I64ToI32Lowering.cpp index 697df1eef..9e6fd106b 100644 --- a/src/passes/I64ToI32Lowering.cpp +++ b/src/passes/I64ToI32Lowering.cpp @@ -175,6 +175,9 @@ struct I64ToI32Lowering : public WalkerPass<PostWalker<I64ToI32Lowering>> { } void visitFunction(Function* func) { + if (func->imported()) { + return; + } if (func->result == i64) { func->result = i32; // body may not have out param if it ends with control flow |