From 1308b446f1380ebe1819bdb316fde25d720f1d28 Mon Sep 17 00:00:00 2001 From: kvpanch <223931578+kvpanch@users.noreply.github.com> Date: Wed, 29 Apr 2026 13:47:34 -0400 Subject: [PATCH] Update LLVM 22 to ca0698598261 and remove LLVM patches (#510) Co-authored-by: LJ <81748770+elle-j@users.noreply.github.com> --- CHANGELOG.md | 5 ++++- llvm | 2 +- patches/llvm/llvm-pr-163679.patch | 15 --------------- patches/llvm/llvm-pr-190219.patch | 18 ------------------ 4 files changed, 5 insertions(+), 35 deletions(-) delete mode 100644 patches/llvm/llvm-pr-163679.patch delete mode 100644 patches/llvm/llvm-pr-190219.patch diff --git a/CHANGELOG.md b/CHANGELOG.md index ee98f5e..60de528 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,10 @@ ## Unreleased - Supported `polkadot-sdk` rev: `2603` -- Updated `LLVM` from `21.1.8` to LLVM `22.1.3` + +### Changed + +- Updated `LLVM` from `21.1.8` to LLVM `22.1.4` ## v1.1.0 diff --git a/llvm b/llvm index 99031a4..ca06985 160000 --- a/llvm +++ b/llvm @@ -1 +1 @@ -Subproject commit 99031a474bb1ea7bd76f86c11efa6937c78ed0d6 +Subproject commit ca069859826106cf2e9f2e86a2ef15a16f5bab5a diff --git a/patches/llvm/llvm-pr-163679.patch b/patches/llvm/llvm-pr-163679.patch deleted file mode 100644 index d4cacfb..0000000 --- a/patches/llvm/llvm-pr-163679.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp -index eb875583ff..169465e18f 100644 ---- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp -+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp -@@ -24830,7 +24830,8 @@ bool RISCVTargetLowering::isIntDivCheap(EVT VT, AttributeList Attr) const { - // instruction, as it is usually smaller than the alternative sequence. - // TODO: Add vector division? - bool OptSize = Attr.hasFnAttr(Attribute::MinSize); -- return OptSize && !VT.isVector(); -+ return OptSize && !VT.isVector() && -+ VT.getSizeInBits() <= getMaxDivRemBitWidthSupported(); - } - - bool RISCVTargetLowering::preferScalarizeSplat(SDNode *N) const { - diff --git a/patches/llvm/llvm-pr-190219.patch b/patches/llvm/llvm-pr-190219.patch deleted file mode 100644 index 40ca013..0000000 --- a/patches/llvm/llvm-pr-190219.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp -index e0597988e..56520d911 100644 ---- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp -+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp -@@ -11055,10 +11055,10 @@ void TargetLowering::forceExpandMultiply(SelectionDAG &DAG, const SDLoc &dl, - // If HiLHS and HiRHS are set, multiply them by the opposite low part and add - // the products to Hi. - if (HiLHS) { -+ SDValue RHLL = DAG.getNode(ISD::MUL, dl, VT, HiRHS, LHS); -+ SDValue RLLH = DAG.getNode(ISD::MUL, dl, VT, RHS, HiLHS); - Hi = DAG.getNode(ISD::ADD, dl, VT, Hi, -- DAG.getNode(ISD::ADD, dl, VT, -- DAG.getNode(ISD::MUL, dl, VT, HiRHS, LHS), -- DAG.getNode(ISD::MUL, dl, VT, RHS, HiLHS))); -+ DAG.getNode(ISD::ADD, dl, VT, RHLL, RLLH)); - } - } -