[all-commits] [llvm/llvm-project] 6fd91b: [Reassociate] allow or->add with shl operands

RotateRight via All-commits all-commits at lists.llvm.org
Sun Feb 7 06:45:45 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6fd91be35444c7c8b7ac0744710b55deba1a61de
      https://github.com/llvm/llvm-project/commit/6fd91be35444c7c8b7ac0744710b55deba1a61de
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-02-07 (Sun, 07 Feb 2021)

  Changed paths:
    M llvm/lib/Transforms/Scalar/Reassociate.cpp
    M llvm/test/Transforms/PhaseOrdering/X86/pixel-splat.ll
    M llvm/test/Transforms/Reassociate/add-like-or.ll

  Log Message:
  -----------
  [Reassociate] allow or->add with shl operands

As discussed in:
https://llvm.org/PR49055

We invert instcombine's add->or transform here
because it makes it easier to identify factorization
transforms like the mul in the motivating test.

This extends the logic added with:
https://reviews.llvm.org/rG70472f3
https://reviews.llvm.org/rG93f3d7f

(I intentionally kept the formatting fix in this patch
to provide more context about the calling logic.)




More information about the All-commits mailing list