public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/115068] New: RISC-V: Illegal instruction of vfwadd
@ 2024-05-13 11:40 juzhe.zhong at rivai dot ai
  2024-05-31 20:36 ` [Bug target/115068] " cvs-commit at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: juzhe.zhong at rivai dot ai @ 2024-05-13 11:40 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115068
           Summary: RISC-V: Illegal instruction of vfwadd
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: juzhe.zhong at rivai dot ai
  Target Milestone: ---

#include <stdint.h>
#include <riscv_vector.h>

vfloat64m8_t test_vfwadd_wf_f64m8_m(vbool8_t vm, vfloat64m8_t vs2, float rs1,
size_t vl) {
  return __riscv_vfwadd_wf_f64m8_m(vm, vs2, rs1, vl);
}

char global_memory[1024];
void *fake_memory = (void *)global_memory;

int main ()
{
  asm volatile("fence":::"memory");
  vfloat64m8_t vfwadd_wf_f64m8_m_vd =
test_vfwadd_wf_f64m8_m(__riscv_vreinterpret_v_i8m1_b8(__riscv_vundefined_i8m1()),
__riscv_vundefined_f64m8(), 1.0, __riscv_vsetvlmax_e64m8());
  asm volatile(""::"vr"(vfwadd_wf_f64m8_m_vd):"memory");

  return 0;
}

https://compiler-explorer.com/z/rq7K33zE5

main:
        fence
        lui     a5,%hi(.LC0)
        flw     fa5,%lo(.LC0)(a5)
        vsetvli a5,zero,e32,m4,ta,ma
        vfwadd.wf       v0,v8,fa5,v0.t ---> vd should not be v0.
        li      a0,0
        ret

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-31 20:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-13 11:40 [Bug c/115068] New: RISC-V: Illegal instruction of vfwadd juzhe.zhong at rivai dot ai
2024-05-31 20:36 ` [Bug target/115068] " cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).