mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-08-13 18:33:08 +00:00
Cherry-pick a patch from 7 to fix an issue with Julia on powerpc - PowerPC-Make-AddrSpaceCast-noop.diff (Closes: #906314)
This commit is contained in:
parent
06db0d2490
commit
1f2dd632ff
8
debian/changelog
vendored
8
debian/changelog
vendored
@ -1,3 +1,11 @@
|
||||
llvm-toolchain-6.0 (1:6.0.1-5) unstable; urgency=medium
|
||||
|
||||
* Cherry-pick a patch from 7 to fix an issue with Julia
|
||||
on powerpc - PowerPC-Make-AddrSpaceCast-noop.diff
|
||||
(Closes: #906314)
|
||||
|
||||
-- Sylvestre Ledru <sylvestre@debian.org> Fri, 17 Aug 2018 08:49:22 +0200
|
||||
|
||||
llvm-toolchain-6.0 (1:6.0.1-4) unstable; urgency=medium
|
||||
|
||||
* Disable force-gcc-header-obj.diff as it is introducing
|
||||
|
43
debian/patches/PowerPC-Make-AddrSpaceCast-noop.diff
vendored
Normal file
43
debian/patches/PowerPC-Make-AddrSpaceCast-noop.diff
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
Index: llvm-toolchain-6.0-6.0.1/CodeGen/PowerPC/addrspacecast.ll
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ llvm-toolchain-6.0-6.0.1/CodeGen/PowerPC/addrspacecast.ll
|
||||
@@ -0,0 +1,22 @@
|
||||
+; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu %s -o - | FileCheck %s
|
||||
+
|
||||
+; Check that codegen for an addrspace cast succeeds without error.
|
||||
+define <4 x i32 addrspace(1)*> @f (<4 x i32*> %x) {
|
||||
+ %1 = addrspacecast <4 x i32*> %x to <4 x i32 addrspace(1)*>
|
||||
+ ret <4 x i32 addrspace(1)*> %1
|
||||
+ ; CHECK-LABEL: @f
|
||||
+}
|
||||
+
|
||||
+; Check that fairly complicated addrspace cast and operations succeed without error.
|
||||
+%struct = type opaque
|
||||
+define void @g (%struct addrspace(10)** %x) {
|
||||
+ %1 = load %struct addrspace(10)*, %struct addrspace(10)** %x
|
||||
+ %2 = addrspacecast %struct addrspace(10)* %1 to %struct addrspace(11)*
|
||||
+ %3 = bitcast %struct addrspace(11)* %2 to i8 addrspace(11)*
|
||||
+ %4 = getelementptr i8, i8 addrspace(11)* %3, i64 16
|
||||
+ %5 = bitcast i8 addrspace(11)* %4 to %struct addrspace(10)* addrspace(11)*
|
||||
+ %6 = load %struct addrspace(10)*, %struct addrspace(10)* addrspace(11)* %5
|
||||
+ store %struct addrspace(10)* %6, %struct addrspace(10)** undef
|
||||
+ ret void
|
||||
+ ; CHECK-LABEL: @g
|
||||
+}
|
||||
Index: llvm-toolchain-6.0-6.0.1/lib/Target/PowerPC/PPCISelLowering.h
|
||||
===================================================================
|
||||
--- llvm-toolchain-6.0-6.0.1.orig/lib/Target/PowerPC/PPCISelLowering.h
|
||||
+++ llvm-toolchain-6.0-6.0.1/lib/Target/PowerPC/PPCISelLowering.h
|
||||
@@ -884,6 +884,11 @@ namespace llvm {
|
||||
}
|
||||
};
|
||||
|
||||
+ 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;
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -59,3 +59,4 @@ D40146-JumpThreading-backport-1.diff
|
||||
D42717-JumpThreading-backport-2.diff
|
||||
llvm-D49832-SCEVPred.patch
|
||||
llvm-rL323946-LSRTy.patch
|
||||
PowerPC-Make-AddrSpaceCast-noop.diff
|
||||
|
Loading…
Reference in New Issue
Block a user