-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
| version / revision | Operating System | Compiler & Version | Compiler Flags | CPU |
|---|---|---|---|---|
| GCC11 | Linux | GCC11 | -mavx2 -mfma -mavx | tigerlake |
Testcase
namespace stdx = std::experimental;
static auto indexSimd = stdx::native_simd<int>{[](int i){ return i; }};
stdx::native_simd<int> b;
int a[3]{42, 43, 44};
stdx::where(indexSimd < 3, b).copy_from(a, stdx::element_aligned);Does this access memory out of bounds? I am pretty sure this code would:
b.copy_from(a, stdx::element_aligned);But I would expect the former to do a maskload such that it doesn't touch the shadow 4th element?
If this is UB, is there any good way to load a partial SIMD from a contiguous region safely? This would be very valuable for iterating over for example a std::vector of length that is not necessarily divisible by the vector block size
Actual Results
Expected Results
Metadata
Metadata
Assignees
Labels
No labels