diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-08-12 11:23:09 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-08-12 11:23:31 -0700 |
commit | def22b8d534168bef164f958028bcb17d3ad23aa (patch) | |
tree | cec9561e777fda5bec428637b99a247b2e001128 /src/analyzer.js | |
parent | 846fb98f0ac29dc556c80b606ce7e6e9c1c8afae (diff) |
legalize add etc. of < 32-bit illegal values properly; fixes #1505
Diffstat (limited to 'src/analyzer.js')
-rw-r--r-- | src/analyzer.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/analyzer.js b/src/analyzer.js index 1a752305..931ce421 100644 --- a/src/analyzer.js +++ b/src/analyzer.js @@ -765,7 +765,15 @@ function analyzer(data, sidePass) { } break; } - case 'add': case 'sub': case 'sdiv': case 'udiv': case 'mul': case 'urem': case 'srem': + case 'add': case 'sub': case 'sdiv': case 'udiv': case 'mul': case 'urem': case 'srem': { + if (sourceBits < 32) { + // when we add illegal types like i24, we must work on the singleton chunks + item.assignTo += '$0'; + item.params[0].ident += '$0'; + item.params[1].ident += '$0'; + } + // fall through + } case 'uitofp': case 'sitofp': case 'fptosi': case 'fptoui': { // We cannot do these in parallel chunks of 32-bit operations. We will handle these in processMathop i++; |