[all-commits] [llvm/llvm-project] ca49a4: [PowerPC] Fix computation of offset for load-and-s...

Nemanja Ivanovic via All-commits all-commits at lists.llvm.org
Mon Jul 27 07:30:02 PDT 2020


  Branch: refs/heads/release/11.x
  Home:   https://github.com/llvm/llvm-project
  Commit: ca49a47b8f87fb942be7c043da2000375346d8b4
      https://github.com/llvm/llvm-project/commit/ca49a47b8f87fb942be7c043da2000375346d8b4
  Author: Nemanja Ivanovic <nemanja.i.ibm at gmail.com>
  Date:   2020-07-27 (Mon, 27 Jul 2020)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCISelLowering.cpp
    M llvm/test/CodeGen/PowerPC/canonical-merge-shuffles.ll

  Log Message:
  -----------
  [PowerPC] Fix computation of offset for load-and-splat for permuted loads

Unfortunately this is another regression from my canonicalization patch
(1fed131660b2). The patch contained two implicit assumptions:
1. That we would have a permuted load only if we are loading a partial vector
2. That a partial vector load would necessarily be as wide as the splat

However, assumption 2 is not correct since it is possible to do a wider
load and only splat a half of it. This patch corrects this assumption by
simply checking if the load is permuted and adjusting the offset if it is.

(cherry picked from commit 7d076e19e31a2a32e357cbdcf0183f88fe1fb0fb)


  Commit: eb3f43bb3a472cbd4dd71b6c7acdf9a298990c29
      https://github.com/llvm/llvm-project/commit/eb3f43bb3a472cbd4dd71b6c7acdf9a298990c29
  Author: Nemanja Ivanovic <nemanja.i.ibm at gmail.com>
  Date:   2020-07-27 (Mon, 27 Jul 2020)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCISelLowering.cpp

  Log Message:
  -----------
  [PowerPC][NFC] Fix an assert that cannot trip from 7d076e19e31a

I mixed up the precedence of operators in the assert and thought I
had it right since there was no compiler warning. This just
adds the parentheses in the expression as needed.

(cherry picked from commit cdead4f89c0eecf11f50092bc088e3a9c6511825)


Compare: https://github.com/llvm/llvm-project/compare/152c2b1befb1...eb3f43bb3a47


More information about the All-commits mailing list