Closed hvdijk closed 2 days ago
@llvm/issue-subscribers-backend-risc-v
Author: Harald van Dijk (hvdijk)
Thanks for catching this. It shouldn't be the other passes' responsibility, RISCVVectorPeephole is doing something wrong here. It should only be considering operands within the same block since it's a local transform.
Reduced from a real test that is too large to include here.
Please consider
test.mir
:This is not handled by RISCVVectorPeephole:
The assert is in the
RISCVVectorPeephole::ensureDominates
function which documentsHowever, when this function is called, no logic is in place that would ensure that
MO
is in the same basic block asSrc
.Is it the responsibility of previous passes to ensure that the
PseudoVLSE32_V_M4_MASK
is in the same basic block as thePseudoVMERGE_VVM_M4
, or is it the responsibility of this pass to handle them being in different blocks?