[PATCH] D108669: [WebAssembly] Fix up out-of-range BUILD_VECTOR lane constants
Derek Schuff via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 24 16:14:32 PDT 2021
dschuff added inline comments.
================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:2055
+ if (Const &&
+ (Val < -(1 << (LaneBits - 1)) || Val > (1 << (LaneBits - 1)) - 1)) {
+ auto NewVal = ((uint64_t)Val % (1u << LaneBits)) - (1u << LaneBits);
----------------
as we discussed offline, maybe we could turn the first half of this expression into an assert.
It might be nice if we could give names to any other of these subexpressions, but I don't know what any of them would be...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108669/new/
https://reviews.llvm.org/D108669
More information about the llvm-commits
mailing list