[llvm] [RISCV] Add guard to prevent GPRPair merge on targets without Zdinx or P (PR #186600)
Kavin Gnanapandithan via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 15 08:35:32 PDT 2026
KavinTheG wrote:
> Right now this is sort-of enforced with a bunch of bools and invoking very similar copies of functions, maybe that's where the confusion is coming from?
I'm not sure what's the best way to solve,
> maybe we're not merging cm.mv* pairs where the a1 move comes before the a0 move
Apologies if I'm misunderstanding your statement, but I think it is able to merge moves where a1 comes before the a0 move according to the comments in `mergePairedInsns`? It swaps the order so that instruction with `a0`/`X10` comes first.
```
// mv a1, s1
// mv a0, s2 => cm.mva01s s2,s1
//
// mv a0, s2
// mv a1, s1 => cm.mva01s s2,s1
```
https://github.com/llvm/llvm-project/pull/186600
More information about the llvm-commits
mailing list