diff options
author | Alon Zakai (kripken) <alonzakai@gmail.com> | 2017-07-31 14:11:33 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2017-08-01 10:10:36 -0700 |
commit | 04418d5617f6ab7015c5cf7b905b4775a5219f4b (patch) | |
tree | 3b6b75b982702f7cabc777ae7fcc3f1a8dec2392 /src/ast/bits.h | |
parent | 5a07a930ad51003411b2bc827ea9bf08728ecc5a (diff) | |
download | binaryen-04418d5617f6ab7015c5cf7b905b4775a5219f4b.tar.gz binaryen-04418d5617f6ab7015c5cf7b905b4775a5219f4b.tar.bz2 binaryen-04418d5617f6ab7015c5cf7b905b4775a5219f4b.zip |
use effective shifts in more places in optimize-instructions
Diffstat (limited to 'src/ast/bits.h')
-rw-r--r-- | src/ast/bits.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ast/bits.h b/src/ast/bits.h index 11cf7b06d..0aee50ffe 100644 --- a/src/ast/bits.h +++ b/src/ast/bits.h @@ -51,7 +51,8 @@ struct Bits { WASM_UNREACHABLE(); } - static Index getEffectiveShifts(Const* amount) { + static Index getEffectiveShifts(Expression* expr) { + auto* amount = expr->cast<Const>(); if (amount->type == i32) { return getEffectiveShifts(amount->value.geti32(), i32); } else if (amount->type == i64) { |