[PATCH] D132923: [RISCV] Support peephole optimization to fold vmerge.vvm that has tail agnostic policy and unmasked intrinsics.
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 12 12:36:02 PDT 2022
reames added a comment.
Can you land the new tests and rebase please? I want to be able to study the test diffs.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp:2656
+ Policy = RISCVII::TAIL_AGNOSTIC;
+ } else
continue;
----------------
This else handles everything which isn't a vmerge right?
If so, the code would be cleaner if it could be written as:
```
if (not a vmerge)
continue;
if (TA) {
} else {
}
```
================
Comment at: llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp:2715
SmallVector<SDValue, 8> Ops;
- Ops.push_back(Merge);
+ if (RISCVII::hasMergeOp(TII->get(MaskedOpc).TSFlags))
+ Ops.push_back(False);
----------------
Do we have an example of masked pseudo without a merge operand? If not, this if-clause should be assert instead.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132923/new/
https://reviews.llvm.org/D132923
More information about the llvm-commits
mailing list