Re: [PATCH][AArch64] Cleanup move immediate code

2022-12-07 Thread Wilco Dijkstra via Gcc-patches
Hi Andreas, Thanks for the report, I've committed the fix: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108006 Cheers, Wilco

Re: [PATCH][AArch64] Cleanup move immediate code

2022-12-07 Thread Andreas Schwab via Gcc-patches
FAIL: gcc.target/aarch64/sve/cond_arith_5.c (internal compiler error: in aarch64_move_imm, at config/aarch64/aarch64.cc:5692) FAIL: gcc.target/aarch64/sve/const_3.c (internal compiler error: in aarch64_move_imm, at config/aarch64/aarch64.cc:5692) FAIL: gcc.target/aarch64/sve/loop_add_5.c

Re: [PATCH][AArch64] Cleanup move immediate code

2022-12-05 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra writes: > Hi Richard, > >> -  scalar_int_mode imode = (mode == HFmode >> -    ? SImode >> -    : int_mode_for_mode (mode).require ()); >> +  machine_mode imode = (mode == DFmode) ? DImode : SImode; > >> It looks like this

Re: [PATCH][AArch64] Cleanup move immediate code

2022-12-05 Thread Wilco Dijkstra via Gcc-patches
Hi Richard, > -  scalar_int_mode imode = (mode == HFmode > -    ? SImode > -    : int_mode_for_mode (mode).require ()); > +  machine_mode imode = (mode == DFmode) ? DImode : SImode; > It looks like this might mishandle DDmode, if not now

Re: [PATCH][AArch64] Cleanup move immediate code

2022-12-01 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra writes: > Hi Richard, > >> Just to make sure I understand: isn't it really just MOVN?  I would have >> expected a 32-bit MOVZ to be equivalent to (and add no capabilities over) >> a 64-bit MOVZ. > > The 32-bit MOVZ immediates are equivalent, MOVN never overlaps, and > MOVI has some

Re: [PATCH][AArch64] Cleanup move immediate code

2022-11-29 Thread Wilco Dijkstra via Gcc-patches
Hi Richard, > Just to make sure I understand: isn't it really just MOVN?  I would have > expected a 32-bit MOVZ to be equivalent to (and add no capabilities over) > a 64-bit MOVZ. The 32-bit MOVZ immediates are equivalent, MOVN never overlaps, and MOVI has some overlaps . Since we allow all 3

Re: [PATCH][AArch64] Cleanup move immediate code

2022-11-24 Thread Richard Sandiford via Gcc-patches
Sorry for the very long delay in reviewing this. Wilco Dijkstra writes: > Hi Richard, > > Here is the immediate cleanup splitoff from the previous patch: > > Simplify, refactor and improve various move immediate functions. > Allow 32-bit MOVZ/N as a valid 64-bit immediate which removes special >

[PATCH][AArch64] Cleanup move immediate code

2022-11-01 Thread Wilco Dijkstra via Gcc-patches
Hi Richard, Here is the immediate cleanup splitoff from the previous patch: Simplify, refactor and improve various move immediate functions. Allow 32-bit MOVZ/N as a valid 64-bit immediate which removes special cases in aarch64_internal_mov_immediate. Add new constraint so the movdi pattern