[Bug target/123010] RISC-V: 32-bit multiply by 2 generates slli+srai+slli and doesn't use slliw or addw

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Dec 4 18:57:26 GMT 2025


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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
```
#include <stdint.h>

#define N 2u

uint32_t mulu(uint32_t a) {
    return a * N;
}

int32_t muls(int32_t a) {
    return a * N;
}
```

The question is what does the ABI say about argument passing and returns?


More information about the Gcc-bugs mailing list