[PATCH] D152810: [RISCV] Fix IMPLICIT_DEF check in doPeepholeMaskedRVV
Luke Lau via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 14 05:21:14 PDT 2023
luke added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp:3188
bool UseTUPseudo = false;
if (RISCVII::hasVecPolicyOp(MaskedMCID.TSFlags)) {
// Some operations are their own TU.
----------------
@reames The more I look at this the more confused I get, specifically this `hasVecPolicyOp` check here.
Looking at `computeInfoForInstr` in `RISCVInsertVSETVLI.cpp` would imply that if a `_MASK` pseudo doesn't have a policy operand, then it's implicitly tail undisturbed and mask undisturbed.
However as you noted, if we don't a policy operand, then `UseTUPseudo` is set to false and we end up using `UnmaskedPseudo`, which is always tail undefined and mask undefined. And it doesn't have a merge operand, so we end up throwing away `N`'s merge operand without actually checking if it's implicit_def. Which would be incorrect?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152810/new/
https://reviews.llvm.org/D152810
More information about the llvm-commits
mailing list