[all-commits] [llvm/llvm-project] ce1eb7: [WebAssembly] Fixed 64-bit indices in br_table
Wouter van Oortmerssen via All-commits
all-commits at lists.llvm.org
Thu Jul 30 10:53:03 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: ce1eb7af9dc1fb1c4167fa21824bda7dcf92bbce
https://github.com/llvm/llvm-project/commit/ce1eb7af9dc1fb1c4167fa21824bda7dcf92bbce
Author: Wouter van Oortmerssen <aardappel at gmail.com>
Date: 2020-07-30 (Thu, 30 Jul 2020)
Changed paths:
M llvm/lib/Target/WebAssembly/WebAssemblyFixBrTableDefaults.cpp
M llvm/test/CodeGen/WebAssembly/switch.ll
Log Message:
-----------
[WebAssembly] Fixed 64-bit indices in br_table
LLVM selection dag assumes "switch" indices are pointer sized, which causes problems for our 32-bit br_table. The new function ensures 32-bit operands don't get unnecessarily extended, and 64-bit operands get truncated.
Note that the changes to the existing test test exactly that: the addition of -NEXT in 2 places ensures no extension is inserted (which the test previously ignored) and that the wrap is present (previously omitted in wasm64 mode).
Differential Revision: https://reviews.llvm.org/D84705
More information about the All-commits
mailing list