[clang] Add _MM_FROUND_TO_NEAREST_TIES_EVEN to avx512fintrin.h (PR #99691)

2024-07-23 Thread Robin Charles Gilbert via cfe-commits

robincharlesgilbert wrote:

Former dev for the math libraries of the Intel compiler here.

It is true that the name _MM_FROUND_TO_NEAREST_INT is quite old. For instance 
(since I see an Intel document quoted here for which I may or may not have been 
one of the authors, and that "all common compilers" is typical codeword for 
MSVC or GCC), this name has been sleeping in GCC inside config/i386/smmintrin.h 
for 17 years now --- a file, like many before and since, that was added by an 
Intel colleague, H.J. Lu, in GCC. However, even back then, this was seen as a 
problematic name in the microscopic world of computational arithmetic (which is 
called Numerics at Intel), since, indeed, it does **not** round to an integer. 
Given that's the default rounding mode, that name did not leave the greatest 
impression. At least it's _MM_ROUND_NEAREST in xmmintrin.h, but that was a few 
years earlier.

This commit does not change the existing name, it only adds a much less 
confusing one while respecting the nomenclature pattern. It will give the name 
that should have been, and it will help remove some confusion about what round 
to nearest actually is.

https://github.com/llvm/llvm-project/pull/99691
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Add _MM_FROUND_TO_NEAREST_TIES_EVEN to avx512fintrin.h (PR #99691)

2024-07-24 Thread Robin Charles Gilbert via cfe-commits

robincharlesgilbert wrote:

> How can we get MSVC to add the new name too?

Regarding the Intel compiler, which is (unlike the LLVM project but like MSVC) 
proprietary, all such modifications are (by far) prompted by customer requests. 
These requests are communicated either directly to the engineers (for example, 
the Argonne National Laboratory makes all sorts of requests to MKL directly) or 
indirectly via tickets opened by the team who handles customers. Assuming that 
the process is similar at Microsoft, then you would need a (significant) 
customer of MSVC to contact them regarding adding the name.

Now, it is possible that features found in open-source projects end up being 
ported in MSVC. All it needs is for a (significant) customer of MSVC to request 
it, because for some reason this is something they saw in GCC/LLVM/etc and they 
want it in MSVC. But before that happens, it needs a precedent; if the name is 
never put anywhere, then nobody will ever request it in MSVC.

https://github.com/llvm/llvm-project/pull/99691
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Add _MM_FROUND_TO_NEAREST_TIES_EVEN to avx512fintrin.h (PR #99691)

2024-07-24 Thread Robin Charles Gilbert via cfe-commits

robincharlesgilbert wrote:

> Aren't the latest versions of Intel's compiler, `icx`, based on LLVM?

Correct. However, the libraries (e.g. math libraries) were all ported from 
`icl` to `icx`. Getting the math libraries of `icl` to compile with `icx` was 
among the last things I did for the company.

https://github.com/llvm/llvm-project/pull/99691
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Add _MM_FROUND_TO_NEAREST_TIES_EVEN to avx512fintrin.h (PR #99691)

2024-07-26 Thread Robin Charles Gilbert via cfe-commits

robincharlesgilbert wrote:

To be fair, regarding MSVC, it might be more than just a chicken and the egg 
problem. It is sometimes in the best interests of Microsoft to make it as 
painful as possible for their customers to port their code onto other 
platforms, or to use standard libraries which are not implemented by Microsoft. 
On the other hand, when it comes to the rounding modes (for other functions 
than the intrinsics of this PR), MSVC has non-standard functions found nowhere 
else (e.g. _controlfp) which are using more objectionable names (_RC_CHOP for 
round toward zero... instead of a more natural name like _RC_ZERO).

Outside the Microsoft ecosystem, code portability is usually less of an issue. 
There is also less of a need to twist the hand of a patron to get the owner of 
a proprietary compiler to fix something.

https://github.com/llvm/llvm-project/pull/99691
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits