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.

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

    Issue actions