You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When comparing two SIMD vectors with ==, the result should be true if and only if every element is equal.
Current Behavior
The result is true if any element is equal, even if others are not.
Failure Information (for bugs)
Steps to Reproduce
Run the following sample code:
a := #simd[4]u32 { 1, 2, 3, 4 }
b := #simd[4]u32 { 1, 3, 4, 5 }
fmt.println(a == b)
This will print true, since the first element is equal. This is also the case for a b of 2,2,4,5, 2,3,3,5, and 2,3,4,4, which all have a single element that matches a.
The text was updated successfully, but these errors were encountered:
I just did a quick check on the resulting asm it gives a combo of (movaps which are load instructions, and pcmpeqd which is the compare instruction)
What I personally think is missing would be a section in the overview that mentions how SIMD semantics in odin match with the output assembly which might not be intuitive at first glance.
Reference: SIMD Reference Compare Packed Data for Equal
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
master
)Expected Behavior
When comparing two SIMD vectors with
==
, the result should be true if and only if every element is equal.Current Behavior
The result is
true
if any element is equal, even if others are not.Failure Information (for bugs)
Steps to Reproduce
Run the following sample code:
This will print
true
, since the first element is equal. This is also the case for ab
of2,2,4,5
,2,3,3,5
, and2,3,4,4
, which all have a single element that matchesa
.The text was updated successfully, but these errors were encountered: