summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
authorAnna Thomas <anna@azul.com>2017-08-08 18:07:44 +0000
committerAnna Thomas <anna@azul.com>2017-08-08 18:07:44 +0000
commit9b6e12f3dce34a9bd4f43d8e0868ac9cea60ecd9 (patch)
tree9712d0c7453ad45563f5e84bfcc93903a6e3e5ca /llvm/lib/Transforms/Utils/Local.cpp
parentb6fd726f9c15aba9e189ad68847db6eced7c7f17 (diff)
downloadbcm5719-llvm-9b6e12f3dce34a9bd4f43d8e0868ac9cea60ecd9.tar.gz
bcm5719-llvm-9b6e12f3dce34a9bd4f43d8e0868ac9cea60ecd9.zip
[LoopVectorize] Fix assertion failure in Fcmp vectorization
Summary: When vectorizing fcmps we can trip on incorrect cast assertion when setting the FastMathFlags after generating the vectorized FCmp. This can happen if the FCmp can be folded to true or false directly. The fix here is to set the FastMathFlag using the FastMathFlagBuilder *before* creating the FCmp Instruction. This is what's done by other optimizations such as InstCombine. Added a test case which trips on cast assertion without this patch. Reviewers: Ayal, mssimpso, mkuper, gilr Reviewed by: Ayal, mssimpso Subscribers: llvm-commits, mzolotukhin Differential Revision: https://reviews.llvm.org/D36244 llvm-svn: 310389
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud