diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-07-17 11:16:49 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2017-07-17 11:16:49 -0700 |
commit | 2daf000f471afdcf21f784f83440bb4bdc1a9de9 (patch) | |
tree | f7c41e52dfeb7949b8d614d521c340633c136ee7 /src | |
parent | 557eca7055ba7b0546624006ddac9eed544a2647 (diff) | |
download | binaryen-2daf000f471afdcf21f784f83440bb4bdc1a9de9.tar.gz binaryen-2daf000f471afdcf21f784f83440bb4bdc1a9de9.tar.bz2 binaryen-2daf000f471afdcf21f784f83440bb4bdc1a9de9.zip |
fix off-by-one in assertion in optimize-instructions
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/OptimizeInstructions.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/passes/OptimizeInstructions.cpp b/src/passes/OptimizeInstructions.cpp index c6006d712..de6f96ccc 100644 --- a/src/passes/OptimizeInstructions.cpp +++ b/src/passes/OptimizeInstructions.cpp @@ -453,7 +453,7 @@ struct OptimizeInstructions : public WalkerPass<PostWalker<OptimizeInstructions, if ((count > 0 && count < 32 - bits) || (constSignBit && count == 0)) { // mixed or [zero upper const bits with sign bit set]; the compared values can never be identical, so // force something definitely impossible even after zext - assert(bits < 31); + assert(bits < 32); c->value = Literal(int32_t(0x80000000)); // TODO: if no side effects, we can just replace it all with 1 or 0 } else { |