[PATCH] D129357: [LoongArch] Implement OR combination to generate bstrins.w/d
WÁNG Xuěruì via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 8 06:12:42 PDT 2022
xen0n added a comment.
What about the arguably more common case of `a = b | ((c & mask) << shamt)` (when `c` is not known to be small enough to not require the masking) or `a = b | (c & mask)`, where all positions in `a` to be overwritten by the incoming bits are known to be zero?
One of the applicable real-world scenario is RISC code generation, where a lot of ORing between a "clean" insn template and shifted/masked operands take place. One doesn't mask the bits in the template hence the optimization chance is missed.
The other cases LGTM, though.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129357/new/
https://reviews.llvm.org/D129357
More information about the llvm-commits
mailing list