diff options
author | Thomas Lively <tlively@google.com> | 2020-06-03 14:04:59 -0700 |
---|---|---|
committer | Thomas Lively <tlively@google.com> | 2020-06-03 14:04:59 -0700 |
commit | 7f50c15be5c020b2789f83dc3c87d28f8294664f (patch) | |
tree | 4d30960311ac91c8558394cff79aeb8410e0577c /llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp | |
parent | d496437a0bfd6d135343026cdb7b6a69cb6af536 (diff) | |
download | llvm-7f50c15be5c020b2789f83dc3c87d28f8294664f.zip llvm-7f50c15be5c020b2789f83dc3c87d28f8294664f.tar.gz llvm-7f50c15be5c020b2789f83dc3c87d28f8294664f.tar.bz2 |
Reland "[WebAssembly] Eliminate range checks on br_tables"
This reverts commit 755a89591528b692315ad0325347e2fd4637271b.
Although I was not able to reproduce any test failures locally,
aheejin was able to reproduce them and found a fix, applied here.
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp index ca098427..7bf655c9 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp @@ -406,6 +406,10 @@ bool WebAssemblyPassConfig::addInstSelector() { // it's inconvenient to collect. Collect it now, and update the immediate // operands. addPass(createWebAssemblySetP2AlignOperands()); + + // Eliminate range checks and add default targets to br_table instructions. + addPass(createWebAssemblyFixBrTableDefaults()); + return false; } |