public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/109479] New: [RISC-V] Build with rv64gc_zve32x_zvl64b should fail but actually not
@ 2023-04-12  5:00 pan2.li at intel dot com
  2023-04-12  5:04 ` [Bug target/109479] " pinskia at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: pan2.li at intel dot com @ 2023-04-12  5:00 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109479
           Summary: [RISC-V] Build with rv64gc_zve32x_zvl64b should fail
                    but actually not
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pan2.li at intel dot com
  Target Milestone: ---

When compiling with option '-march=rv64gc_zve32x_zvl64b', it should report an
error similar to clang, you can see this case in below link.

https://godbolt.org/z/qn1bcK7Pn

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

* [Bug target/109479] [RISC-V] Build with rv64gc_zve32x_zvl64b should fail but actually not
  2023-04-12  5:00 [Bug c/109479] New: [RISC-V] Build with rv64gc_zve32x_zvl64b should fail but actually not pan2.li at intel dot com
@ 2023-04-12  5:04 ` pinskia at gcc dot gnu.org
  2023-04-12  6:08 ` pan2.li at intel dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-04-12  5:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 54836
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54836&action=edit
testcase

Next time please attach or put inline the testcase instead of just linking to
godbolt. Also you should put why it should fail instead of just saying it
should fail because clang says it fails.

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

* [Bug target/109479] [RISC-V] Build with rv64gc_zve32x_zvl64b should fail but actually not
  2023-04-12  5:00 [Bug c/109479] New: [RISC-V] Build with rv64gc_zve32x_zvl64b should fail but actually not pan2.li at intel dot com
  2023-04-12  5:04 ` [Bug target/109479] " pinskia at gcc dot gnu.org
@ 2023-04-12  6:08 ` pan2.li at intel dot com
  2023-04-12  6:19 ` kito at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pan2.li at intel dot com @ 2023-04-12  6:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Li Pan <pan2.li at intel dot com> ---
Thanks for reminding me. Sorry for missing that and will pay more attention to
this next time.

The test case.

#include "riscv_vector.h"

vint64m1_t foo ()
{
    vint64m1_t v;
    return v;
}

According to the RVV SPEC below, the 'vint64m1_t' (aka '__rvv_int64m1_t')
requires the 'zve64x' extensions.

https://github.com/riscv/riscv-v-spec/blob/master/v-spec.adoc#18-standard-vector-extensions

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

* [Bug target/109479] [RISC-V] Build with rv64gc_zve32x_zvl64b should fail but actually not
  2023-04-12  5:00 [Bug c/109479] New: [RISC-V] Build with rv64gc_zve32x_zvl64b should fail but actually not pan2.li at intel dot com
  2023-04-12  5:04 ` [Bug target/109479] " pinskia at gcc dot gnu.org
  2023-04-12  6:08 ` pan2.li at intel dot com
@ 2023-04-12  6:19 ` kito at gcc dot gnu.org
  2023-04-12  6:24 ` [Bug target/109479] [RISC-V] Build vint64m1_t with rv64gc_zve32x_zvl64b should promote information like "vint64m1_t requires the 'zve64x' extensions" juzhe.zhong at rivai dot ai
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: kito at gcc dot gnu.org @ 2023-04-12  6:19 UTC (permalink / raw)
  To: gcc-bugs

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

Kito Cheng <kito at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2023-04-12

--- Comment #3 from Kito Cheng <kito at gcc dot gnu.org> ---
Title might little bit misleading, -march=rv64gc_zve32x_zvl64b is valid arch
configuration, invalid thing is vint64m*_t and vuint64m*_t are invalid for
rv64gc_zve32x.

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

* [Bug target/109479] [RISC-V] Build vint64m1_t with rv64gc_zve32x_zvl64b should promote information like "vint64m1_t requires the 'zve64x' extensions"
  2023-04-12  5:00 [Bug c/109479] New: [RISC-V] Build with rv64gc_zve32x_zvl64b should fail but actually not pan2.li at intel dot com
                   ` (2 preceding siblings ...)
  2023-04-12  6:19 ` kito at gcc dot gnu.org
@ 2023-04-12  6:24 ` juzhe.zhong at rivai dot ai
  2023-04-12  6:27 ` pan2.li at intel dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: juzhe.zhong at rivai dot ai @ 2023-04-12  6:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from JuzheZhong <juzhe.zhong at rivai dot ai> ---
Thanks for reporting it. Will fix soon today or tomorrow.

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

* [Bug target/109479] [RISC-V] Build vint64m1_t with rv64gc_zve32x_zvl64b should promote information like "vint64m1_t requires the 'zve64x' extensions"
  2023-04-12  5:00 [Bug c/109479] New: [RISC-V] Build with rv64gc_zve32x_zvl64b should fail but actually not pan2.li at intel dot com
                   ` (3 preceding siblings ...)
  2023-04-12  6:24 ` [Bug target/109479] [RISC-V] Build vint64m1_t with rv64gc_zve32x_zvl64b should promote information like "vint64m1_t requires the 'zve64x' extensions" juzhe.zhong at rivai dot ai
@ 2023-04-12  6:27 ` pan2.li at intel dot com
  2023-04-12 11:10 ` juzhe.zhong at rivai dot ai
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pan2.li at intel dot com @ 2023-04-12  6:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Li Pan <pan2.li at intel dot com> ---
Thanks kito, update the title for clarification.

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

* [Bug target/109479] [RISC-V] Build vint64m1_t with rv64gc_zve32x_zvl64b should promote information like "vint64m1_t requires the 'zve64x' extensions"
  2023-04-12  5:00 [Bug c/109479] New: [RISC-V] Build with rv64gc_zve32x_zvl64b should fail but actually not pan2.li at intel dot com
                   ` (4 preceding siblings ...)
  2023-04-12  6:27 ` pan2.li at intel dot com
@ 2023-04-12 11:10 ` juzhe.zhong at rivai dot ai
  2023-04-12 15:08 ` cvs-commit at gcc dot gnu.org
  2023-04-12 15:09 ` kito at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: juzhe.zhong at rivai dot ai @ 2023-04-12 11:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from JuzheZhong <juzhe.zhong at rivai dot ai> ---
https://gcc.gnu.org/pipermail/gcc-patches/2023-April/615562.html
Fix patch here.

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

* [Bug target/109479] [RISC-V] Build vint64m1_t with rv64gc_zve32x_zvl64b should promote information like "vint64m1_t requires the 'zve64x' extensions"
  2023-04-12  5:00 [Bug c/109479] New: [RISC-V] Build with rv64gc_zve32x_zvl64b should fail but actually not pan2.li at intel dot com
                   ` (5 preceding siblings ...)
  2023-04-12 11:10 ` juzhe.zhong at rivai dot ai
@ 2023-04-12 15:08 ` cvs-commit at gcc dot gnu.org
  2023-04-12 15:09 ` kito at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-12 15:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Kito Cheng <kito@gcc.gnu.org>:

https://gcc.gnu.org/g:31eb8f18bbe64613fd8d77c4520c00beeb13598f

commit r13-7156-g31eb8f18bbe64613fd8d77c4520c00beeb13598f
Author: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
Date:   Wed Apr 12 21:56:05 2023 +0800

    RISC-V: Fix supporting data type according to RVV ISA. [PR109479]

    For vint64m*_t, we should only allow them in zve64* instead of
zve32*_zvl64b (>=64b).
    Ideally, we should make error message more friendly like Clang.
    https://godbolt.org/z/f9GMv4dMo to report the RVV type require extenstion
name.
    However, I failed to find a way to do that. So current GCC can only report
"unknown" type.
    And I added comments to remind us doing this in the future.

    gcc/ChangeLog:

            PR target/109479
            * config/riscv/riscv-vector-builtins-types.def (vint8mf8_t): Fix
predicate.
            (vint16mf4_t): Ditto.
            (vint32mf2_t): Ditto.
            (vint64m1_t): Ditto.
            (vint64m2_t): Ditto.
            (vint64m4_t): Ditto.
            (vint64m8_t): Ditto.
            (vuint8mf8_t): Ditto.
            (vuint16mf4_t): Ditto.
            (vuint32mf2_t): Ditto.
            (vuint64m1_t): Ditto.
            (vuint64m2_t): Ditto.
            (vuint64m4_t): Ditto.
            (vuint64m8_t): Ditto.
            (vfloat32mf2_t): Ditto.
            (vbool64_t): Ditto.
            * config/riscv/riscv-vector-builtins.cc (register_builtin_type):
Add comments.
            (register_vector_type): Ditto.
            (check_required_extensions): Fix condition.
            * config/riscv/riscv-vector-builtins.h (RVV_REQUIRE_ZVE64): Remove
it.
            (RVV_REQUIRE_ELEN_64): New define.
            (RVV_REQUIRE_MIN_VLEN_64): Ditto.
            * config/riscv/riscv-vector-switch.def (TARGET_VECTOR_FP32): Remove
it.
            (TARGET_VECTOR_FP64): Ditto.
            (ENTRY): Fix predicate.
            * config/riscv/vector-iterators.md: Fix predicate.

    gcc/testsuite/ChangeLog:

            PR target/109479
            * gcc.target/riscv/rvv/base/pr109479-1.c: New test.
            * gcc.target/riscv/rvv/base/pr109479-2.c: New test.
            * gcc.target/riscv/rvv/base/pr109479-3.c: New test.
            * gcc.target/riscv/rvv/base/pr109479-4.c: New test.
            * gcc.target/riscv/rvv/base/pr109479-5.c: New test.
            * gcc.target/riscv/rvv/base/pr109479-6.c: New test.

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

* [Bug target/109479] [RISC-V] Build vint64m1_t with rv64gc_zve32x_zvl64b should promote information like "vint64m1_t requires the 'zve64x' extensions"
  2023-04-12  5:00 [Bug c/109479] New: [RISC-V] Build with rv64gc_zve32x_zvl64b should fail but actually not pan2.li at intel dot com
                   ` (6 preceding siblings ...)
  2023-04-12 15:08 ` cvs-commit at gcc dot gnu.org
@ 2023-04-12 15:09 ` kito at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: kito at gcc dot gnu.org @ 2023-04-12 15:09 UTC (permalink / raw)
  To: gcc-bugs

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

Kito Cheng <kito at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #8 from Kito Cheng <kito at gcc dot gnu.org> ---
Fixed on upstream now :)

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

end of thread, other threads:[~2023-04-12 15:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-12  5:00 [Bug c/109479] New: [RISC-V] Build with rv64gc_zve32x_zvl64b should fail but actually not pan2.li at intel dot com
2023-04-12  5:04 ` [Bug target/109479] " pinskia at gcc dot gnu.org
2023-04-12  6:08 ` pan2.li at intel dot com
2023-04-12  6:19 ` kito at gcc dot gnu.org
2023-04-12  6:24 ` [Bug target/109479] [RISC-V] Build vint64m1_t with rv64gc_zve32x_zvl64b should promote information like "vint64m1_t requires the 'zve64x' extensions" juzhe.zhong at rivai dot ai
2023-04-12  6:27 ` pan2.li at intel dot com
2023-04-12 11:10 ` juzhe.zhong at rivai dot ai
2023-04-12 15:08 ` cvs-commit at gcc dot gnu.org
2023-04-12 15:09 ` kito 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).