Message ID | 20240711054535.17904-1-xuli1@eswincomputing.com |
---|---|
State | New |
Headers | show |
Series | RISC-V: Disable misaligned vector access in hook riscv_slow_unaligned_access | expand |
> diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc > index 61fa74e9322..87270fd7af4 100644 > --- a/gcc/config/riscv/riscv.cc > +++ b/gcc/config/riscv/riscv.cc > @@ -10271,7 +10271,7 @@ riscv_cannot_copy_insn_p (rtx_insn *insn) > static bool > riscv_slow_unaligned_access (machine_mode, unsigned int) > { > - return riscv_slow_unaligned_access_p; > + return !TARGET_VECTOR && riscv_slow_unaligned_access_p; I guess this should be considered whether the mode is vector mode or not, something like that? return VECTOR_MODE_P (mode) ? TARGET_VECTOR_MISALIGN_SUPPORTED : riscv_slow_unaligned_access_p; > } > > static bool > -- > 2.17.1 >
diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index 61fa74e9322..87270fd7af4 100644 --- a/gcc/config/riscv/riscv.cc +++ b/gcc/config/riscv/riscv.cc @@ -10271,7 +10271,7 @@ riscv_cannot_copy_insn_p (rtx_insn *insn) static bool riscv_slow_unaligned_access (machine_mode, unsigned int) { - return riscv_slow_unaligned_access_p; + return !TARGET_VECTOR && riscv_slow_unaligned_access_p; } static bool