The InstrEmitter can sometimes insert a copy after an IMPLICIT_DEF
before connecting it to the vector instruction. This occurs when
constrainRegClass reduces to a class with less than 4 registers.
I believe LMUL8 on masked instructions triggers this since the
result can only use the v8, v16, or v24 register group as the mask
is using v0.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
It's a shame we can't test this with something like MIR. So it sounds like you're seeing an implicit def of VRM8 and a copy from VRM8 to VRM8NoV0?
Comment Actions
Add mir test containing the pattern I'm seeing. Run it through finalize-isel. Without the patch we use 27 instead of 91 for the vsetvli immediate.
Comment Actions
Ah yeah I forgot that this is all run during finalize-isel so we can in fact use MIR. Thanks, LGTM.
clang-format not found in user's PATH; not linting file.