Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Headers/fmaintrin.h | ||
---|---|---|
22 | We are using a special format to describute the function in a pseudo code to share it with the intrinsic guide, e.g., There's no strong requirement to follow it, but it would be better to adopt a uniform format. | |
26 | It would be odd to user given this is just 1/3 instructions the intrinsic may generate, but I don't have a good idea here. |
clang/lib/Headers/fmaintrin.h | ||
---|---|---|
22 | Is a FOR loop with computed bit offsets really clearer than "For each element" ? Is it valuable to repeat information that can be found in the instruction reference? | |
26 | I listed the 213 version because that's the one that multiplies the first two operands, and the intrinsic multiplies the first two operands. So it's the instruction that most closely corresponds to the intrinsic. |
clang/lib/Headers/fmaintrin.h | ||
---|---|---|
22 | We have internal tools to verify them according to these offsets (but of course not for 100% intrinsics), which means we can trust such information in most time. The suggestion is based on:
As I said before, I'm not forcing this way. You decide it. | |
26 | Note, intrinsics are force inlined. It's rare user will wrap it in a simple function with the same arguments order. In reality, each version may be generated. https://godbolt.org/z/q7j8Wxrnb However, I'm not against this approach if we don't have any better way to describe it. |
I chose to leave the "for each element" cases as-is, but I will keep your comments in mind as I go through other intrinsics.
We are using a special format to describute the function in a pseudo code to share it with the intrinsic guide, e.g.,
https://github.com/llvm/llvm-project/blob/main/clang/lib/Headers/avx512fintrin.h#L9604-L9610
https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm512_i32logather_pd&ig_expand=4077
There's no strong requirement to follow it, but it would be better to adopt a uniform format.