https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111621

            Bug ID: 111621
           Summary: [RISC-V] Bad register allocation in vadd.vi may cause
                    operational error
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mumuxi_ll at outlook dot com
  Target Milestone: ---

Hi;

My source code can be fond at https://godbolt.org/z/8v9Wxx9Yf.

The porblem is that when compiling with -O2/-O3, vadd.vi will allocate a
different  register for vd compared to vs2, then the actual operation will only
update the first data in vd instead of all. In cases such as -O0, vadd.vi will
allocate the same registers to vd and vs2, and all vd values will be refreshed
after execution.

Thanks!

Reply via email to