Skip to content

[RISC-V] disambiguation error of rvv intrinsic vector-scalar calls with fixed-length vector type #64404

Closed
@garthlei

Description

@garthlei

Code:

#include <riscv_vector.h>

typedef vint64m1_t __attribute__((riscv_rvv_vector_bits(128))) vint64m1_128_t;

int main() {
  vint64m1_t a;
  vint64m1_128_t b;
  vint64m1_t c = __riscv_vand(a, 0, 0);
  vint64m1_t d = __riscv_vand(b, 0, 0);
}

Compiler message (clang -march=rv64gcv -mrvv-vector-bits=128 -S test.c):

test.c:9:18: error: call to '__riscv_vand' is ambiguous
    9 |   vint64m1_t d = __riscv_vand(b, 0, 0);
      |                  ^~~~~~~~~~~~
test.c:9:18: note: candidate function
test.c:9:18: note: candidate function
test.c:9:18: note: candidate function
test.c:9:18: note: candidate function
test.c:9:18: note: candidate function
test.c:9:18: note: candidate function
1 error generated.

Activity

llvmbot

llvmbot commented on Aug 4, 2023

@llvmbot
Member

@llvm/issue-subscribers-backend-risc-v

topperc

topperc commented on Aug 4, 2023

@topperc
Collaborator

It does work with -fno-lax-vector-conversions. I need to investigate more.

llvmbot

llvmbot commented on Oct 26, 2023

@llvmbot
Member

@llvm/issue-subscribers-clang-frontend

Author: Garth Lei (garthlei)

Code: ``` c #include <riscv_vector.h>

typedef vint64m1_t attribute((riscv_rvv_vector_bits(128))) vint64m1_128_t;

int main() {
vint64m1_t a;
vint64m1_128_t b;
vint64m1_t c = __riscv_vand(a, 0, 0);
vint64m1_t d = __riscv_vand(b, 0, 0);
}


Compiler message (`clang -march=rv64gcv -mrvv-vector-bits=128 -S test.c`):

test.c:9:18: error: call to '__riscv_vand' is ambiguous
9 | vint64m1_t d = __riscv_vand(b, 0, 0);
| ^~~~~~~~~~~~
test.c:9:18: note: candidate function
test.c:9:18: note: candidate function
test.c:9:18: note: candidate function
test.c:9:18: note: candidate function
test.c:9:18: note: candidate function
test.c:9:18: note: candidate function
1 error generated.

</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend:RISC-Vclang:frontendLanguage frontend issues, e.g. anything involving "Sema"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @EugeneZelenko@topperc@garthlei@llvmbot

        Issue actions

          [RISC-V] disambiguation error of rvv intrinsic vector-scalar calls with fixed-length vector type · Issue #64404 · llvm/llvm-project