[all-commits] [llvm/llvm-project] b5b61c: [VectorCombine] Preserves the maximal legal FPMath...

Henry Jiang via All-commits all-commits at lists.llvm.org
Wed Jun 5 08:36:00 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b5b61cce96580552a796f21fdcbee3080fd04a9e
      https://github.com/llvm/llvm-project/commit/b5b61cce96580552a796f21fdcbee3080fd04a9e
  Author: Henry Jiang <h243jian at uwaterloo.ca>
  Date:   2024-06-05 (Wed, 05 Jun 2024)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
    M llvm/test/Transforms/VectorCombine/AArch64/shuffletoidentity.ll

  Log Message:
  -----------
  [VectorCombine] Preserves the maximal legal FPMathFlags during foldShuffleToIdentity (#94295)

The `VectorCombine::foldShuffleToIdentity` does not preserve fast math
flags when folding the shuffle, leading to unexpected vectorized result
and missed optimizations with FMA instructions.

We can conservatively take the maximal legal set of fast math flags
whenever we fold shuffles to identity to enable further optimizations in
the backend.

---------

Co-authored-by: Henry Jiang <henry.jiang1 at ibm.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list