[all-commits] [llvm/llvm-project] e78fb5: [InstCombine] reassociate splatted vector ops

RotateRight via All-commits all-commits at lists.llvm.org
Mon Feb 3 06:12:18 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e78fb556c5520161fb5943b665da3ca98f3ae53d
      https://github.com/llvm/llvm-project/commit/e78fb556c5520161fb5943b665da3ca98f3ae53d
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-02-03 (Mon, 03 Feb 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/test/Transforms/InstCombine/vec_shuffle.ll
    M llvm/test/Transforms/LoopVectorize/induction.ll

  Log Message:
  -----------
  [InstCombine] reassociate splatted vector ops

bo (splat X), (bo Y, OtherOp) --> bo (splat (bo X, Y)), OtherOp

This patch depends on the splat analysis enhancement in D73549.
See the test with comment:
; Negative test - mismatched splat elements
...as the motivation for that first patch.

The motivating case for reassociating splatted ops is shown in PR42174:
https://bugs.llvm.org/show_bug.cgi?id=42174

In that example, a slight change in order-of-associative math results
in a big difference in IR and codegen. This patch gets all of the
unnecessary shuffles out of the way, but doesn't address the potential
scalarization (see D50992 or D73480 for that).

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




More information about the All-commits mailing list