andykaylor wrote:

> > This might not have been noticed because, unlike the `__builtin_fmax` 
> > handling, Clang's `__builtin_elementwise_max` doesn't set the `nsz` flag so 
> > the backend never gets the message that it can ignore the sign of zero on 
> > operands, but I'm pretty sure that Clang's documentation for 
> > `__builtin_elementwise_max` is saying that the sign of zero may be ignored.
> 
> If you really really want that, that should be a distinct elementwise 
> fmin/fmax.
> 
> Alternatively we should round out the math pragmas to have nsz

The Clang documentation for `__builtin_elementwise_max` already indicates that 
it doesn't respect signed zero (that is, it maps to the IEEE-754 2008 
`maxNum`). We could add `__builtin_elementwise_fmax` and leave 
`__builtin_elementwise_max` deprecated. I suppose that adds a bit of clarity, 
but my understanding is that it was depcrecated because we have too many 
variations of this already.

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

Reply via email to