Re: [PATCH] RISC-V: force arg and target to reg rtx under -O0

2023-06-25 Thread Jeff Law via Gcc-patches
On 6/24/23 21:43, juzhe.zh...@rivai.ai wrote: Hi, Li. Appreciate for catching this! I think it's better: -emit_insn (gen_rtx_SET (gen_lowpart (e.vector_mode (), e.target), src)); +emit_move_insn (gen_lowpart (e.vector_mode (), e.target), src); do this to fix this issue. Agreed. Assuming a va

Re: [PATCH] RISC-V: force arg and target to reg rtx under -O0

2023-06-24 Thread juzhe.zh...@rivai.ai
08 To: gcc-patches CC: kito.cheng; palmer; juzhe.zhong; Li Xu Subject: [PATCH] RISC-V: force arg and target to reg rtx under -O0 arg and target should be expanded to reg rtx during expand pass. Consider this following case: void test_vlmul_ext_v_i8mf8_i8mf4(vint8mf8_t op1) { vint8mf4_

[PATCH] RISC-V: force arg and target to reg rtx under -O0

2023-06-24 Thread Li Xu
arg and target should be expanded to reg rtx during expand pass. Consider this following case: void test_vlmul_ext_v_i8mf8_i8mf4(vint8mf8_t op1) { vint8mf4_t res = __riscv_vlmul_ext_v_i8mf8_i8mf4(op1); } Compilation fails with: test.c: In function 'test_vlmul_ext_v_i8mf8_i8mf4': test.c:5:1: err