[PATCH] D114060: [RISCV][NFC] Simplify immediate materialisation
Ben Shi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 17 19:22:03 PST 2021
benshi001 added a comment.
In D114060#3136769 <https://reviews.llvm.org/D114060#3136769>, @craig.topper wrote:
> In D114060#3136742 <https://reviews.llvm.org/D114060#3136742>, @benshi001 wrote:
>
>> In D114060#3136735 <https://reviews.llvm.org/D114060#3136735>, @craig.topper wrote:
>>
>>> Is the compiler simplicity worth making the assembly harder to read since it won't print zext.w anymore?
>>
>> The immediate materialisation already become more tricky with SHxADD/BCLRI/BSETI/SLLIUW, most assembly sequances are not obvious, so is it necessary to keep immediate materialisation assembly readable ?
>
> I'm not arguing the readability of the whole immediate materialization itself. That you have to be able to read like any other instructions. My concern is that this is the only time the compiler will emit a slli.uw with a zero shift amount and there's no alias for it. It might be surprising the first time someone sees it.
Is there a way to append a comment after the machine instruction when calling BuildMI ? Could it be better to be `slli.uw a0, a0, 0 ; zero extend i32 to i64` ?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114060/new/
https://reviews.llvm.org/D114060
More information about the llvm-commits
mailing list