[all-commits] [llvm/llvm-project] b5fb26: [InstCombine] reassociate FP diff of sums into sum...

RotateRight via All-commits all-commits at lists.llvm.org
Sun Jun 14 06:12:05 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b5fb26951a8ee6479f288bf078afa3f8cf698035
      https://github.com/llvm/llvm-project/commit/b5fb26951a8ee6479f288bf078afa3f8cf698035
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-06-14 (Sun, 14 Jun 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
    M llvm/test/Transforms/InstCombine/vector-reductions.ll
    M llvm/test/Transforms/PhaseOrdering/X86/vector-reductions.ll

  Log Message:
  -----------
  [InstCombine] reassociate FP diff of sums into sum of diffs

(a[0] + a[1] + a[2] + a[3]) - (b[0] + b[1] + b[2] +b[3]) -->
(a[0] - b[0]) + (a[1] - b[1]) + (a[2] - b[2]) + (a[3] - b[3])

This should be the last step in solving PR43953:
https://bugs.llvm.org/show_bug.cgi?id=43953

We started emitting reduction intrinsics with:
D80867/ rGe50059f6b6b3
So it's a relatively easy pattern match now to re-order those ops.
Also, I have not seen any complaints for the switch to intrinsics
yet, so I'll propose to remove the "experimental" tag from the
intrinsics soon.

Differential Revision: https://reviews.llvm.org/D81491




More information about the All-commits mailing list