juliaGuix/patches/llvm-PPC-addrspaces.patch

30 lines
1.0 KiB
Diff

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