[PATCH] D131492: [RISCV] Implement isMaskAndCmp0FoldingBeneficial hook
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 9 08:12:14 PDT 2022
reames requested changes to this revision.
reames added inline comments.
This revision now requires changes to proceed.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:1147
+ // extension is supported and the mask is a power of two. However, we
+ // conservatively return false if the mask would bit in an ANDI instruction,
+ // on the basis that it's possible the fold wouldn't decrease the
----------------
This bit of logic feels like you're covering up something else. Moving around the and instruction in IR shouldn't directly cause the bexti to be used if the andi form is legal and profitable. Do we maybe have a missing pattern?
As a guess, maybe this is intersecting with D131482?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131492/new/
https://reviews.llvm.org/D131492
More information about the llvm-commits
mailing list