[all-commits] [llvm/llvm-project] 14d726: [PowerPC] Don't remove single swap between the loa...

Nemanja Ivanovic via All-commits all-commits at lists.llvm.org
Tue Aug 4 08:38:50 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 14d726acd6041ee8fc595e48ec871b50b40ccc1d
      https://github.com/llvm/llvm-project/commit/14d726acd6041ee8fc595e48ec871b50b40ccc1d
  Author: Nemanja Ivanovic <nemanja.i.ibm at gmail.com>
  Date:   2020-08-04 (Tue, 04 Aug 2020)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp
    A llvm/test/CodeGen/PowerPC/swaps-le-8.ll

  Log Message:
  -----------
  [PowerPC] Don't remove single swap between the load and store

The swap removal pass looks to remove swaps when a loaded value is swapped, some
number of lane-insensitive operations are performed and then the value is
swapped again and stored.

However, in a situation where we load the value, swap it and then store it
without swapping again, the pass erroneously removes the single swap. The
reason is that both checks in the same equivalence class:

- load feeds a swap
- swap feeds a store

pass. However, there is no check that the two swaps are actually a single swap.
This patch just fixes that.

Differential revision: https://reviews.llvm.org/D84785




More information about the All-commits mailing list