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

Renato Golin via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 11 07:14:18 PST 2016


rengolin created this revision.
rengolin added reviewers: hfinkel, jmolloy, nadav, aschwaighofer.
rengolin added subscribers: llvm-commits, kristof.beyls, aadg.
rengolin set the repository for this revision to rL LLVM.
Herald added subscribers: mzolotukhin, rengolin, aemerson.

Some SIMD implementations are not IEEE-754 compliant, for example ARM's NEON.
This patch teaches the loop vectorizer to only allow transformations of loops
that either contain no floating-point operations or have enough allowance
flags supporting lack of precision, including -ffast-math and other NaN/Inf
related flags.

For that, the target description now has a method which tells us if the
SIMD unit is IEEE-754 compliant, and the vectorizer has a check on every
FP instruction in the candidate loop to check for the safety flags.

Fixes PR16275.

Repository:
  rL LLVM

http://reviews.llvm.org/D17141

Files:
  include/llvm/Analysis/TargetTransformInfo.h
  include/llvm/Analysis/TargetTransformInfoImpl.h
  lib/Analysis/TargetTransformInfo.cpp
  lib/Target/ARM/ARMTargetTransformInfo.h
  lib/Transforms/Vectorize/LoopVectorize.cpp
  test/Transforms/LoopVectorize/ARM/arm-ieee-vectorize.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17141.47643.patch
Type: text/x-patch
Size: 18367 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160211/892b3e52/attachment-0001.bin>


More information about the llvm-commits mailing list