[PATCH] D38054: [PowerPC] Reimplement r310809 with fix for the spill issue

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 14:04:58 PDT 2017


nemanjai created this revision.

When I committed r310809, I didn't realize that it exposed a bug in the compare lowering I committed previously. Namely the issue is that compares of i32 values used code that produces 64-bit immediate results. When the register allocator spilled one of those intermediate values, it would spill/reload it as a 32-bit value. The sign bits are then lost and the comparison produces incorrect results.

This patch is basically r310809 but with the addition of the fix for the spilling issue. Namely, we now ensure that if the intermediate results are 64-bit values, the value is changed to an i64 so that it is spilled/reloaded as a 64-bit entity.


Repository:
  rL LLVM

https://reviews.llvm.org/D38054

Files:
  lib/Target/PowerPC/PPCISelDAGToDAG.cpp
  test/CodeGen/PowerPC/testComparesieqsc.ll
  test/CodeGen/PowerPC/testComparesieqsi.ll
  test/CodeGen/PowerPC/testComparesieqss.ll
  test/CodeGen/PowerPC/testComparesiequc.ll
  test/CodeGen/PowerPC/testComparesiequi.ll
  test/CodeGen/PowerPC/testComparesiequs.ll
  test/CodeGen/PowerPC/testComparesigesc.ll
  test/CodeGen/PowerPC/testComparesigesi.ll
  test/CodeGen/PowerPC/testComparesigess.ll
  test/CodeGen/PowerPC/testComparesilesc.ll
  test/CodeGen/PowerPC/testComparesilesi.ll
  test/CodeGen/PowerPC/testComparesiless.ll
  test/CodeGen/PowerPC/testCompareslleqsc.ll
  test/CodeGen/PowerPC/testCompareslleqsi.ll
  test/CodeGen/PowerPC/testCompareslleqss.ll
  test/CodeGen/PowerPC/testComparesllequc.ll
  test/CodeGen/PowerPC/testComparesllequi.ll
  test/CodeGen/PowerPC/testComparesllequs.ll
  test/CodeGen/PowerPC/testComparesllgesc.ll
  test/CodeGen/PowerPC/testComparesllgesi.ll
  test/CodeGen/PowerPC/testComparesllgess.ll
  test/CodeGen/PowerPC/testCompareslllesc.ll
  test/CodeGen/PowerPC/testCompareslllesi.ll
  test/CodeGen/PowerPC/testComparesllless.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38054.115899.patch
Type: text/x-patch
Size: 61700 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170919/3f3c0657/attachment.bin>


More information about the llvm-commits mailing list