[all-commits] [llvm/llvm-project] b351ef: [PowerPC] Do not emit XXSPLTI32DX for sub 64-bit c...

Tom Stellard via All-commits all-commits at lists.llvm.org
Wed Feb 3 14:08:18 PST 2021


  Branch: refs/heads/release/12.x
  Home:   https://github.com/llvm/llvm-project
  Commit: b351efcae08a59c0cafa123a92b24c5f2300202b
      https://github.com/llvm/llvm-project/commit/b351efcae08a59c0cafa123a92b24c5f2300202b
  Author: Nemanja Ivanovic <nemanja.i.ibm at gmail.com>
  Date:   2021-02-03 (Wed, 03 Feb 2021)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCISelLowering.cpp
    M llvm/test/CodeGen/PowerPC/p10-splatImm32.ll

  Log Message:
  -----------
  [PowerPC] Do not emit XXSPLTI32DX for sub 64-bit constants

If the APInt returned by BuildVectorSDNode::isConstantSplat() is narrower than
64 bits, the result produced by XXSPLTI32DX is incorrect. The result returned
by the function appears to be incorrect and we'll investigate/fix it in a
follow-up commit. However, since this causes miscompiles, we must
temporarily disable emitting this instruction for such values.

(cherry picked from commit 54e570d94af995ff58287a8288389641910a8239)


  Commit: dfb763363bc560769605e37e96c1d13cb236223d
      https://github.com/llvm/llvm-project/commit/dfb763363bc560769605e37e96c1d13cb236223d
  Author: Albion Fung <conanap at lep82435v.canlab.ibm.com>
  Date:   2021-02-03 (Wed, 03 Feb 2021)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCISelLowering.cpp
    M llvm/test/CodeGen/PowerPC/p10-splatImm32.ll

  Log Message:
  -----------
  [PowerPC][Power10] Fix XXSPLI32DX not correctly exploiting specific cases

Some cases may be transformed into 32 bit splats before hitting the boolean statement, which may cause incorrect behaviour and provide XXSPLTI32DX with the incorrect values of splat. The condition was reversed so that the shortcut prevents this problem.

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

(cherry picked from commit 2e470e03b49f1d79ebc315ca9d62a690a633c0cd)


Compare: https://github.com/llvm/llvm-project/compare/e3658cefc5bc...dfb763363bc5


More information about the All-commits mailing list