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

--- Comment #20 from Wojciech Mula <wojciech_mula at poczta dot onet.pl> ---
This constants is worth checking (appears in division by 10): 

```
unsigned long ccd() {
    return 0xcccccccccccccccd;
}
```

riscv64-unknown-linux-gnu-g++ (crosstool-NG UNKNOWN) 15.0.0 20241111
(experimental):

```
ccd():
        li      a0,858992640
        li      a5,858992640
        addi    a0,a0,819
        addi    a5,a5,818
        slli    a0,a0,32
        add     a0,a0,a5
        xori    a0,a0,-1
        ret
```

clang 20:

```
ccd():
        lui     a0, 838861
        addiw   a0, a0, -819
        slli    a1, a0, 32
        add     a0, a0, a1
        ret
```

Reply via email to