Based on reviewer comments on https://reviews.llvm.org/D126692 I've
added FastMathFlags to the select instruction used when tail-folding
with reductions. These flags can then be used by InstCombine to
decide upon the most optimal floating point identity value for
fadd/fsub. Doing so unlocks further optimisations, such as folding
selects into masked loads.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM - see inline comment for a possible minor improvement.
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | ||
---|---|---|
3909 | Given the variable name, shouldn't this be a 'SelectInst*' rather than a 'Value*'? Then we wouldn't need the cast<> in the new line of code. |
Given the variable name, shouldn't this be a 'SelectInst*' rather than a 'Value*'? Then we wouldn't need the cast<> in the new line of code.