[PATCH] D144619: [WebAssembly] Skip implied bitmask operation in LowerShift
Thomas Lively via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 28 07:03:06 PST 2023
tlively added a comment.
Thanks for the ping! Sorry this fell through the cracks.
================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:2307
+ MaskOp = LHS;
+ } else {
+ if (!isa<ConstantSDNode>(RHS.getNode()))
----------------
Do we have tests that cover the case where the mask op is not a vector?
================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:2311-2312
+
+ auto ConstantRHS = dyn_cast<ConstantSDNode>(RHS.getNode());
+ if (ConstantRHS->getAPIntValue() == MaskBits)
+ MaskOp = LHS;
----------------
IIUC, there's no guarantee that the cast succeeds, so we have to guard against null here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144619/new/
https://reviews.llvm.org/D144619
More information about the llvm-commits
mailing list