Re: [PATCH] RISC-V: Return machine_mode rather than opt_machine_mode for get_mask_mode, NFC

2023-08-09 Thread Maciej W. Rozycki
On Mon, 31 Jul 2023, Maciej W. Rozycki wrote: > > > That's a good suggestion! Thanks, let me try to apply myself workflow :) > > I'm thinking that as part of the CI POC being done by RISE that the base AMI > > image ought to be gcc-13 based and that we should configure the toolchains > > we > >

Re: [PATCH] RISC-V: Return machine_mode rather than opt_machine_mode for get_mask_mode, NFC

2023-07-31 Thread Maciej W. Rozycki
On Mon, 31 Jul 2023, Jeff Law wrote: > > That's a good suggestion! Thanks, let me try to apply myself workflow :) > I'm thinking that as part of the CI POC being done by RISE that the base AMI > image ought to be gcc-13 based and that we should configure the toolchains we > build with

Re: [PATCH] RISC-V: Return machine_mode rather than opt_machine_mode for get_mask_mode, NFC

2023-07-31 Thread Maciej W. Rozycki
On Mon, 31 Jul 2023, Kito Cheng wrote: > > I just configure with `--enable-werror-always', which we want to keep > > our standards up to anyway, > > I rely on the host GCC which is 11 relatively old compared to the > trunk, so --enable-werror-always will get many -Wformat* warning :( If

Re: [PATCH] RISC-V: Return machine_mode rather than opt_machine_mode for get_mask_mode, NFC

2023-07-31 Thread Jeff Law via Gcc-patches
On 7/31/23 08:52, Kito Cheng via Gcc-patches wrote: On Mon, Jul 31, 2023 at 10:03 PM Maciej W. Rozycki wrote: On Mon, 31 Jul 2023, Kito Cheng wrote: Sorry for disturbing, pushed a fix for that, and...added -Werror=unused-variable to my build script to prevent that happen again :( I

Re: [PATCH] RISC-V: Return machine_mode rather than opt_machine_mode for get_mask_mode, NFC

2023-07-31 Thread Kito Cheng via Gcc-patches
On Mon, Jul 31, 2023 at 10:03 PM Maciej W. Rozycki wrote: > > On Mon, 31 Jul 2023, Kito Cheng wrote: > > > Sorry for disturbing, pushed a fix for that, and...added > > -Werror=unused-variable to my build script to prevent that happen > > again :( > > I just configure with

Re: [PATCH] RISC-V: Return machine_mode rather than opt_machine_mode for get_mask_mode, NFC

2023-07-31 Thread Maciej W. Rozycki
On Mon, 31 Jul 2023, Kito Cheng wrote: > Sorry for disturbing, pushed a fix for that, and...added > -Werror=unused-variable to my build script to prevent that happen > again :( I just configure with `--enable-werror-always', which we want to keep our standards up to anyway, but if you find

Re: [PATCH] RISC-V: Return machine_mode rather than opt_machine_mode for get_mask_mode, NFC

2023-07-31 Thread Kito Cheng via Gcc-patches
Hi Maciej: Sorry for disturbing, pushed a fix for that, and...added -Werror=unused-variable to my build script to prevent that happen again :( On Mon, Jul 31, 2023 at 7:08 PM Maciej W. Rozycki wrote: > > On Mon, 31 Jul 2023, Kito Cheng via Gcc-patches wrote: > > > Pushed, thanks :) > > This

Re: [PATCH] RISC-V: Return machine_mode rather than opt_machine_mode for get_mask_mode, NFC

2023-07-31 Thread Maciej W. Rozycki
On Mon, 31 Jul 2023, Kito Cheng via Gcc-patches wrote: > Pushed, thanks :) This breaks compilation: .../gcc/config/riscv/riscv-v.cc: In function 'void riscv_vector::expand_vec_series(rtx, rtx, rtx)': .../gcc/config/riscv/riscv-v.cc:1251:16: error: unused variable 'mask_mode'

Re: [PATCH] RISC-V: Return machine_mode rather than opt_machine_mode for get_mask_mode, NFC

2023-07-31 Thread Kito Cheng via Gcc-patches
Pushed, thanks :) On Mon, Jul 31, 2023 at 2:59 PM juzhe.zh...@rivai.ai wrote: > > ok > > > > juzhe.zh...@rivai.ai > > From: Kito Cheng > Date: 2023-07-31 14:52 > To: gcc-patches; kito.cheng; juzhe.zhong; rdapp.gcc; pan2.li > CC: Kito Cheng > Subject: [PATCH

Re: [PATCH] RISC-V: Return machine_mode rather than opt_machine_mode for get_mask_mode, NFC

2023-07-31 Thread juzhe.zh...@rivai.ai
ok juzhe.zh...@rivai.ai From: Kito Cheng Date: 2023-07-31 14:52 To: gcc-patches; kito.cheng; juzhe.zhong; rdapp.gcc; pan2.li CC: Kito Cheng Subject: [PATCH] RISC-V: Return machine_mode rather than opt_machine_mode for get_mask_mode, NFC We always want get_mask_mode return a valid mode, it's

[PATCH] RISC-V: Return machine_mode rather than opt_machine_mode for get_mask_mode, NFC

2023-07-31 Thread Kito Cheng via Gcc-patches
We always want get_mask_mode return a valid mode, it's something wrong if it failed, so I think we could just move the `.require ()` into get_mask_mode, instead of calling that every call-site. The only exception is riscv_get_mask_mode, it might put supported mode into get_mask_mode, so added a