public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/115325] New: RVV vmulh and vmulhu unknown without -march, but vmul is known
@ 2024-06-03 9:33 jan.wassenberg at gmail dot com
2024-06-03 9:40 ` [Bug target/115325] " pinskia at gcc dot gnu.org
2024-06-04 12:33 ` jan.wassenberg at gmail dot com
0 siblings, 2 replies; 3+ messages in thread
From: jan.wassenberg at gmail dot com @ 2024-06-03 9:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115325
Bug ID: 115325
Summary: RVV vmulh and vmulhu unknown without -march, but vmul
is known
Product: gcc
Version: 14.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: jan.wassenberg at gmail dot com
Target Milestone: ---
To allow runtime dispatch (detecting at runtime whether V is available), we
would like to compile without -march=.
In GCC 13 for RVV this raised an #error. Looks like there has been progress in
GCC 14, no more #error in riscv_vector.h, but there is a strange difference
between vmulh and vmulh. Repro: https://gcc.godbolt.org/z/9PjEajq7r
When compiling without -march, vmul is at least known, though we get
"return type 'vint64m1_t' requires the V ISA extension". We are almost but not
entirely able to get rid of this by using vectors only within the function:
https://gcc.godbolt.org/z/W74j7nzvs
(This is also blocking runtime dispatch.)
When compiling without -march, the situation worsens: changing vmul to vmulh
results in "error: '__riscv_vmulh_vv_i64m1' was not declared in this scope; did
you mean '__riscv_vmul_vv_i64m1'?".
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/115325] RVV vmulh and vmulhu unknown without -march, but vmul is known
2024-06-03 9:33 [Bug c++/115325] New: RVV vmulh and vmulhu unknown without -march, but vmul is known jan.wassenberg at gmail dot com
@ 2024-06-03 9:40 ` pinskia at gcc dot gnu.org
2024-06-04 12:33 ` jan.wassenberg at gmail dot com
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-03 9:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115325
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The correct way of doing this is to use `pragma GCC target` but that is not
supported on riscv yet ...
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/115325] RVV vmulh and vmulhu unknown without -march, but vmul is known
2024-06-03 9:33 [Bug c++/115325] New: RVV vmulh and vmulhu unknown without -march, but vmul is known jan.wassenberg at gmail dot com
2024-06-03 9:40 ` [Bug target/115325] " pinskia at gcc dot gnu.org
@ 2024-06-04 12:33 ` jan.wassenberg at gmail dot com
1 sibling, 0 replies; 3+ messages in thread
From: jan.wassenberg at gmail dot com @ 2024-06-04 12:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115325
--- Comment #2 from Jan Wassenberg <jan.wassenberg at gmail dot com> ---
Thanks, we are equipped to use pragma GCC target as soon as it is ready. Is
there any bug/tracker to which I could subscribe for updates on that?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-04 12:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-03 9:33 [Bug c++/115325] New: RVV vmulh and vmulhu unknown without -march, but vmul is known jan.wassenberg at gmail dot com
2024-06-03 9:40 ` [Bug target/115325] " pinskia at gcc dot gnu.org
2024-06-04 12:33 ` jan.wassenberg at gmail dot com
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).