<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/132604>132604</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang++] operator==(vector of long, vector of long) -> vector of long long
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ImpleLee
</td>
</tr>
</table>
<pre>
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;
}
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyMVF2vozgM_TXpi9WKJlDggYd-SqtZaV9GmkcUgoHshIRNArdzf_0qwO30dlaalYISGfvk2D4xd062GrEgyYkklw0ffWds8Uc_KPwTcVOZ-kfxrUMNwvQDt1K34N8MTNxKXil0YBqYUHhjw0kZ3RJ6BqF4OJwIPYFFP1rtgL_4PZylFkY76TxqD2_Sd7CG7kh07LwfHGFHQm-E3lpTV0b5nbEtobf38H2ZUpPH9TcSHcM6RMsSC0QwUSa1UGONQNjZ_xiw9JZL7wi7LkGjC2l9hbkGp1aP4T52XOiWTr4joVnYTENottDOw0ouJLkAYZclF3Za8L7C_XF2nnspSu4cWh9gfL2gS1c63mM5EXZ-GC32ZsLSYoMWtcDSE3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