Revision f92a55a06a1018ec83cc1bda24cf1d0d34af613e authored by Alex Arslan on 07 August 2018, 16:29:47 UTC, committed by GitHub on 07 August 2018, 16:29:47 UTC
1 parent b815ac5
Raw File
llvm-PPC-addrspaces.patch
From 15899eaab58e96bb7bbe7a14099674e255656a50 Mon Sep 17 00:00:00 2001
From: Valentin Churavy <v.churavy@gmail.com>
Date: Fri, 23 Feb 2018 14:41:20 -0500
Subject: [PATCH] Make AddrSpaceCast noops on PPC

PPC as AArch64 doesn't have address-spaces so we can drop them in the backend
---
 lib/Target/PowerPC/PPCISelLowering.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/Target/PowerPC/PPCISelLowering.h b/lib/Target/PowerPC/PPCISelLowering.h
index e60504507d3..c9b89773968 100644
--- a/lib/Target/PowerPC/PPCISelLowering.h
+++ b/lib/Target/PowerPC/PPCISelLowering.h
@@ -761,6 +761,11 @@ namespace llvm {
       ReuseLoadInfo() : IsInvariant(false), Alignment(0), Ranges(nullptr) {}
     };

+    bool isNoopAddrSpaceCast(unsigned SrcAS, unsigned DestAS) const override {
+      // Addrspacecasts are always noops.
+      return true;
+    }
+
     bool canReuseLoadAddress(SDValue Op, EVT MemVT, ReuseLoadInfo &RLI,
                              SelectionDAG &DAG,
                              ISD::LoadExtType ET = ISD::NON_EXTLOAD) const;
-- 
2.16.2

back to top