[PATCH] D34368: [AArch64] PointerRegClass should not include XZR

Yi Kong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 19 14:35:57 PDT 2017


kongyi created this revision.
Herald added subscribers: javed.absar, aemerson.

XZR cannot be used to hold pointers. Reduce the pointer register class from GPR64RegClass to GPR64commonRegClass, which excludes XZR and SP.


Repository:
  rL LLVM

https://reviews.llvm.org/D34368

Files:
  lib/Target/AArch64/AArch64RegisterInfo.cpp


Index: lib/Target/AArch64/AArch64RegisterInfo.cpp
===================================================================
--- lib/Target/AArch64/AArch64RegisterInfo.cpp
+++ lib/Target/AArch64/AArch64RegisterInfo.cpp
@@ -167,7 +167,7 @@
 const TargetRegisterClass *
 AArch64RegisterInfo::getPointerRegClass(const MachineFunction &MF,
                                       unsigned Kind) const {
-  return &AArch64::GPR64RegClass;
+  return &AArch64::GPR64commonRegClass;
 }
 
 const TargetRegisterClass *


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34368.103110.patch
Type: text/x-patch
Size: 501 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170619/0b7ea5bd/attachment.bin>


More information about the llvm-commits mailing list