[PATCH] D95774: [RISCV] Optimize (srl (and X, 0xffff), C) -> (srli (slli X, 16), 16 + C).
Luís Marques via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 1 03:06:02 PST 2021
luismarques added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp:556-557
+ // Optimize (srl (and X, 0xffff), C) -> (srli (slli X, 16), 16 + C).
+ // Taking into account that the 0xffff may have had lower bits removed by
+ // SimplifyDemandedBits.
+ // This avoids materializing the 0xffff immediate. This pattern occurs when
----------------
luismarques wrote:
> Nit: maybe "set to zero" instead of "removed", otherwise it seems like the mask was shifted?
Or, better yet, "unset".
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95774/new/
https://reviews.llvm.org/D95774
More information about the llvm-commits
mailing list