RE: [PATCH] RISC-V: cost model for loading 64bit constant in rv32

2022-11-09 Thread Sinan via Gcc-patches
>> comparison with clang: >> https://godbolt.org/z/v5nxTbKe9 > > IIUC the rules are generally no compiler explorer links (so we can > preserve history) and no attachment patches (ie, inline them like > git-send-email does). There's some documenation on sending pat

Re: [PATCH] RISC-V: cost model for loading 64bit constant in rv32

2022-11-08 Thread Palmer Dabbelt
On Tue, 08 Nov 2022 19:26:01 PST (-0800), gcc-patches@gcc.gnu.org wrote: loading constant 0x739290001LL in rv32 can be done with three instructions output: li a1, 7 lui a1, 234128 addi a1, a1, 1 Probably more useful to load the constant into two different registers? The point is the same, tho

[PATCH] RISC-V: cost model for loading 64bit constant in rv32

2022-11-08 Thread Sinan via Gcc-patches
loading constant 0x739290001LL in rv32 can be done with three instructions output: li a1, 7 lui a1, 234128 addi a1, a1, 1 Similarly, loading 0x839290001LL in rv32 can be done within three instructions expected output: li a1, 8 lui a1, 234128 addi a1, a1, 1 However, riscv_build_integer does not hand