https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121213

--- Comment #15 from Vincenzo Romano <vincenzo.romano at gmail dot com> ---
(In reply to Vincenzo Romano from comment #9)
> I confirm trunk now produces expected code also for case no.2 .

With "unsigned int" argument, CURRENT TRUNK adds a useless "sext.w" after a
"lw":
"lw" already sign extends the operand.

clang trunk keeps emitting correct machine code.

Refs:

https://godbolt.org/z/h39Gs9466

https://riscv.github.io/riscv-isa-manual/snapshot/spec/#_load_and_store_instructions
  • [Bug target/121213] Poor RV6... vincenzo.romano at gmail dot com via Gcc-bugs

Reply via email to