[PATCH] D67513: [PowerPC] Remove the SPE4RC register class and instead add f32 to the GPRC register class.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 12 12:10:48 PDT 2019


craig.topper created this revision.
Herald added subscribers: steven.zhang, shchenz, jsji, dexonsmith, MaskRay, kbarton, hiraditya, mehdi_amini, nemanjai.
Herald added a project: LLVM.

Since the SPE4RC register class contains an identical set of registers
and an identical spill size to the GPRC class its slightly confusing
the tablegen emitter. It's preventing the GPRC_and_GPRC_NOR0 synthesized
register class from inheriting VTs and AltOrders from GPRC or GPRC_NOR0.
This is because SPE4C is found first in the super register class list
when inheriting these properties and it doesn't set the VTs or
AltOrders the same way as GPRC or GPRC_NOR0.

This patch replaces all uses of GPE4RC with GPRC and allows GPRC and
GPRC_NOR0 to contain f32.

The test changes here are because the AltOrders are being inherited
to GPRC_NOR0 now.

Found while trying to determine if getCommonSubClass needs to take
a VT argument. It was originally added to support fp128 on x86-64,
I've changed some things about that so that it might be needed
anymore. But a PowerPC test crashed without it and I think its
due to this subclass issue.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D67513

Files:
  llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp
  llvm/lib/Target/PowerPC/PPCFastISel.cpp
  llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
  llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
  llvm/lib/Target/PowerPC/PPCInstrInfo.td
  llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
  llvm/lib/Target/PowerPC/PPCRegisterInfo.td
  llvm/test/CodeGen/PowerPC/inc-of-add.ll
  llvm/test/CodeGen/PowerPC/sub-of-not.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67513.219967.patch
Type: text/x-patch
Size: 17376 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190912/5df43f65/attachment.bin>


More information about the llvm-commits mailing list