Issue |
132604
|
Summary |
[clang++] operator==(vector of long, vector of long) -> vector of long long
|
Labels |
clang
|
Assignees |
|
Reporter |
ImpleLee
|
When comparing two variables of vector of long, clang++ returns a vector of long long, inconsistent with g++.
https://godbolt.org/z/zKv7o94dW
```c++
#include <type_traits>
using T [[gnu::vector_size(sizeof(long))]] = long;
T x;
static_assert(std::is_same_v<std::remove_reference_t<decltype(std::declval<decltype(x == x)>()[0])>, long>);
```
This makes the following code fails to compile with clang++ with the compilation options `-march=x86-64-v4 -std=c++20` (previously reported as [gcc bugzilla 118546](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118546)).
Online link: https://godbolt.org/z/sxqsKrv9e .
```c++
#include <experimental/simd>
#include <cstdint>
using deduce_t_element = std::experimental::simd<
std::uint64_t,
std::experimental::simd_abi::deduce_t<std::uint64_t, 4>
>;
auto f(deduce_t_element e) {
return e == 0;
}
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs