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

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to camel-cdr from comment #4)
> I don't really see how this would be a parameter/return value thing,
> considering the multiply by 3 does use addw.

Also try:
```
#include <stdint.h>

#define N 2

void mulu(uint32_t *a) {
    *a = *a * N;
}

void muls(int32_t *a) {
    *a = *a * N;
}

```

You will GCC produces:
```
        lw      a5,0(a0)
        slliw   a5,a5,1
        sw      a5,0(a0)
        ret
```

Reply via email to