This is an archive of the discontinued LLVM Phabricator instance.

[SLPVectorizer][X86][AMDGPU] Remove fcmp+select to fmin/fmax reduction support.
ClosedPublic

Authored by craig.topper on Sep 9 2020, 2:13 PM.

Details

Summary

Previously we could match fcmp+select to a reduction if the fcmp had
the nonans fast math flag. But if the select had the nonans fast
math flag, InstCombine would turn it into a fminnum/fmaxnum intrinsic
before SLP gets to it. Seems fairly likely that if one of the
fcmp+select pair have the fast math flag, they both would.

My plan is to start vectorizing the fmaxnum/fminnum version soon,
but I wanted to get this code out as it had some of the strangest
fast math flag behaviors.

Diff Detail