[all-commits] [llvm/llvm-project] a34882: [RISCV] Allow folding vmerge with implicit passthr...
Luke Lau via All-commits
all-commits at lists.llvm.org
Fri Jul 5 21:43:33 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a348824798e03c1ffd10e6a1c5340130b0f48bf9
https://github.com/llvm/llvm-project/commit/a348824798e03c1ffd10e6a1c5340130b0f48bf9
Author: Luke Lau <luke at igalia.com>
Date: 2024-07-06 (Sat, 06 Jul 2024)
Changed paths:
M llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
M llvm/test/CodeGen/RISCV/rvv/rvv-peephole-vmerge-vops.ll
M llvm/test/CodeGen/RISCV/rvv/vmadd-vp.ll
Log Message:
-----------
[RISCV] Allow folding vmerge with implicit passthru when true has tied dest (#78565)
We currently don't fold a vmerge if it has an implicit-def passthru and
its true operand also has a passthru (i.e. tied dest).
This restriction was added in https://reviews.llvm.org/D151596, back
whenever we had separate TU/TA pseudos. It looks like it was added
because the policy might not have been handled correctly.
However the policy should be set correctly if we relax this restriction
today, since we compute the policy differently now that we have removed
the TU/TA distinction in our pseudos.
We use a TUMU policy, and relax it to TAMU iff the vmerge's passthru is
implicit-def.
The reasoning behind this being that the tail elements always come from
the vmerge's passthru[^1], so if vmerge's passthru is implicit-def then
the tail is also implicit-def. So a tail agnostic policy is OK.
[^1]: unless the VL was shrunk, but in this case which case we
conservatively use TUMU.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list