wpcwzy wrote:

Hi all,

I've added a second commit on top of the original patch.

The new commit fixes a follow-on problem: even with the libcall preserved, 
under `-fmath-errno` the function declaration still has default may-read/write 
memory effects, so the loop vectorizer's dependence analysis still refuses to 
vectorize. Now, when a libm math function annotated with `#pragma omp declare 
simd` is called inside an OpenMP SIMD loop, the call site will be marked as 
memory(none). This only affects calls inside SIMD loops and ordinary scalar 
calls outside loops are untouched. Functions with output pointers (sincos, 
modf, etc.) are excluded.

To classify libm functions by name under `-fo-builtin`(the config glibc uses 
for its libmvec ABI tests, where getBuiltinID() returns 0), we added an 
interface called `isConstWithoutErrnoAndExceptions(StringRef)`.

Reviews and comments are greatly welcomed. :)

https://github.com/llvm/llvm-project/pull/193881
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to