[LoopUtils] reduce FMF and min/max complexity when forming reductions
authorSanjay Patel <spatel@rotateright.com>
Wed, 30 Dec 2020 20:22:26 +0000 (15:22 -0500)
committerSanjay Patel <spatel@rotateright.com>
Wed, 30 Dec 2020 20:22:26 +0000 (15:22 -0500)
commit8ca60db40bd944dc5f67e0f200a403b4e03818ea
treef3cd714c9604b46e9b7666f548157d7ce1e65ce2
parent5ced712e9851f00ecd81ba4dc235811bbc9ec5a2
[LoopUtils] reduce FMF and min/max complexity when forming reductions

I don't know if there's some way this changes what the vectorizers
may produce for reductions, but I have added test coverage with
3567908 and 5ced712 to show that both passes already have bugs in
this area. Hopefully this does not make things worse before we can
really fix it.
llvm/include/llvm/Transforms/Utils/LoopUtils.h
llvm/lib/Transforms/Utils/LoopUtils.cpp
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp