Skip to content

Commit a0bee23

Browse files
committed
rust: add a patch backported from LLVM 17.0.3 for powerpc.
This gets us back to building rust with the internal LLVM on NetBSD/macppc. Ref. rust-lang/rust#116845
1 parent 6e1385c commit a0bee23

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

rust/distinfo

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ SHA1 (patch-src_llvm-project_llvm_cmake_modules_AddLLVM.cmake) = e1b2eb2f0b3cf1c
130130
SHA1 (patch-src_llvm-project_llvm_include_llvm-c_DataTypes.h) = cb011fc19957883c01725797f7c85ed1b20f96f1
131131
SHA1 (patch-src_llvm-project_llvm_include_llvm_Analysis_ConstantFolding.h) = 39d76e6659143d154ae690ac70781b698a2023d8
132132
SHA1 (patch-src_llvm-project_llvm_lib_Support_BLAKE3_blake3__impl.h) = 67e93f198258a5b59580be20ff47ce58b146c5d5
133+
SHA1 (patch-src_llvm-project_llvm_lib_Target_PowerPC_PPCISelLowering.cpp) = b68197c1486a4dc40154b3b23dfd55d44048a2d2
133134
SHA1 (patch-src_llvm-project_llvm_utils_FileCheck_FileCheck.cpp) = 2587c2f4d11ad8f75bf8a16de625135b26bacc15
134135
SHA1 (patch-src_tools_cargo_src_cargo_core_profiles.rs) = e1af7fde97416e0a269ee34efd37f4f47fcf7a95
135136
SHA1 (patch-src_tools_cargo_tests_testsuite_build.rs) = 60713699c968f3e389f486e796009d31a5048906
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
$NetBSD$
2+
3+
Backport change from LLVM 17.0.3, so that rust builds
4+
with the embedded LLVM.
5+
Ref. https://github.com/rust-lang/rust/issues/116845.
6+
7+
--- src/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp.orig 2023-10-03 02:52:40.000000000 +0000
8+
+++ src/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
9+
@@ -15527,7 +15527,7 @@ SDValue PPCTargetLowering::PerformDAGCom
10+
break;
11+
SDValue ConstOp = DAG.getConstant(Imm, dl, MVT::i32);
12+
SDValue NarrowAnd = DAG.getNode(ISD::AND, dl, MVT::i32, NarrowOp, ConstOp);
13+
- return DAG.getAnyExtOrTrunc(NarrowAnd, dl, N->getValueType(0));
14+
+ return DAG.getZExtOrTrunc(NarrowAnd, dl, N->getValueType(0));
15+
}
16+
case ISD::SHL:
17+
return combineSHL(N, DCI);

0 commit comments

Comments
 (0)