[PATCH] D153993: [Headers][doc] Add load/store/cmp/cvt intrinsic descriptions to avx2intrin.h

Phoebe Wang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 29 09:31:53 PDT 2023


pengfei added inline comments.


================
Comment at: clang/lib/Headers/avx2intrin.h:3474
+///   IF __M[j+31] == 1
+///     result[j+31:j] := Load32(__X+(i*4))
+///   ELSE
----------------
probinson wrote:
> pengfei wrote:
> > A more intrinsic guide format is `MEM[__X+j:j]`
> LoadXX is the syntax in the gather intrinsics, e.g. _mm_mask_i32gather_pd. I'd prefer to be consistent.
I think the problem here is the measurement is easily confusing.
>From C point of view, `__X` is a `int` pointer, so we should `+ i` rather than `i * 4`
>From the other part of the code, we are measuring in bits, but here `i * 4` is a byte offset.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153993/new/

https://reviews.llvm.org/D153993



More information about the cfe-commits mailing list