As reported in the documentation the rldicl instruction should not be used when targeting 32bit CPUs.
Since rldicl is used to clear the upper 32bits of the byteswapped register I've patched the tablegen pattern to avoid emitting it when a 32bit CPU is targeted.
It's my first adventure with TableGen and its DSL so be kind, I also have a few unresolved questions:
- Should the predicate be use64BitRegs instead of In64BitMode ?
- The i64 byteswap is marked as legal but is still expanded, I'd expect that to cause a "failure to select" error but that's not the case. Am I missing something?
These are the right predicates to use. Using RLDICL in 32-bit mode is at best unnecessary here and at worst not legal.