[PATCH] D17141: [ARM] Adding IEEE-754 SIMD detection to loop vectorizer

Owen Anderson via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 12 11:13:42 PST 2016


resistor added a comment.

In http://reviews.llvm.org/D17141#351600, @rengolin wrote:

> In http://reviews.llvm.org/D17141#351589, @resistor wrote:
>
> > That's not correct for all platforms.  Darwin, for example, uses NEON for floating point even in non-fast-math mode.  The platform is simply defined not to support subnormals.
>
>
> Well, NEON denormal behaviour is independent of the OS running underneath, so this is the correct information. But it may not be the best decision for Darwin, and that's a separate story.


It *does* depend on the OS running underneath, and I'm providing an example right here.  This is comparable to the fact that many implementations do not provide sNaN support.

> Can you always add a fast-math flag on Darwin builds in the front-end? Or maybe have another CC1 option to control SIMD use?


That's not an acceptable solution.  Darwin AArch32 specific documents that that subnormals are not supported on the platform, but users can and do expect that code compiled without an explicit -ffast-math will respect other floating point properties, such as preventing floating point reassociation.

> I don't think adding isDarwin() to the TTI makes any sense.


You can probably add a hook for "supportsSubnormals", but it'll end up being "!(isAArch32() && isDarwin())"


Repository:
  rL LLVM

http://reviews.llvm.org/D17141





More information about the llvm-commits mailing list