[arch-commits] Commit in llvm/repos/extra-x86_64 (13 files)
Evangelos Foutras
foutrelis at gemini.archlinux.org
Sun May 15 20:17:56 UTC 2022
Date: Sunday, May 15, 2022 @ 20:17:55
Author: foutrelis
Revision: 445847
archrelease: copy trunk to extra-x86_64
Added:
llvm/repos/extra-x86_64/PKGBUILD
(from rev 445846, llvm/trunk/PKGBUILD)
llvm/repos/extra-x86_64/disable-A-B-A-B-and-BSWAP-in-InstCombine.patch
(from rev 445846, llvm/trunk/disable-A-B-A-B-and-BSWAP-in-InstCombine.patch)
llvm/repos/extra-x86_64/disable-DIArgList-in-SPIR-V.patch
(from rev 445846, llvm/trunk/disable-DIArgList-in-SPIR-V.patch)
llvm/repos/extra-x86_64/don-t-accept-nullptr-as-GEP-element-type.patch
(from rev 445846, llvm/trunk/don-t-accept-nullptr-as-GEP-element-type.patch)
llvm/repos/extra-x86_64/don-t-move-DBG_VALUE-instructions.patch
(from rev 445846, llvm/trunk/don-t-move-DBG_VALUE-instructions.patch)
llvm/repos/extra-x86_64/llvm-config.h
(from rev 445846, llvm/trunk/llvm-config.h)
llvm/repos/extra-x86_64/no-strict-aliasing-DwarfCompileUnit.patch
(from rev 445846, llvm/trunk/no-strict-aliasing-DwarfCompileUnit.patch)
Deleted:
llvm/repos/extra-x86_64/PKGBUILD
llvm/repos/extra-x86_64/disable-bswap-for-spir.patch
llvm/repos/extra-x86_64/don-t-accept-nullptr-as-GEP-element-type.patch
llvm/repos/extra-x86_64/don-t-move-DBG_VALUE-instructions.patch
llvm/repos/extra-x86_64/llvm-config.h
llvm/repos/extra-x86_64/no-strict-aliasing-DwarfCompileUnit.patch
------------------------------------------------+
PKGBUILD | 293 +++++++++++------------
disable-A-B-A-B-and-BSWAP-in-InstCombine.patch | 52 ++++
disable-DIArgList-in-SPIR-V.patch | 23 +
disable-bswap-for-spir.patch | 50 ---
don-t-accept-nullptr-as-GEP-element-type.patch | 126 ++++-----
don-t-move-DBG_VALUE-instructions.patch | 182 +++++++-------
llvm-config.h | 18 -
no-strict-aliasing-DwarfCompileUnit.patch | 26 +-
8 files changed, 399 insertions(+), 371 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2022-05-15 20:17:45 UTC (rev 445846)
+++ PKGBUILD 2022-05-15 20:17:55 UTC (rev 445847)
@@ -1,145 +0,0 @@
-# Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
-# Contributor: Jan "heftig" Steffens <jan.steffens at gmail.com>
-
-pkgname=('llvm' 'llvm-libs' 'llvm-ocaml')
-pkgver=13.0.1
-pkgrel=2
-_ocaml_ver=4.13.1
-arch=('x86_64')
-url="https://llvm.org/"
-license=('custom:Apache 2.0 with LLVM Exception')
-makedepends=('cmake' 'ninja' 'libffi' 'libedit' 'ncurses' 'libxml2'
- "ocaml>=$_ocaml_ver" 'ocaml-ctypes' 'ocaml-findlib'
- 'python-setuptools' 'python-psutil' 'python-sphinx'
- 'python-recommonmark')
-options=('staticlibs' '!lto') # Getting thousands of test failures with LTO
-_source_base=https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver
-source=($_source_base/$pkgname-$pkgver.src.tar.xz{,.sig}
- don-t-accept-nullptr-as-GEP-element-type.patch
- don-t-move-DBG_VALUE-instructions.patch
- no-strict-aliasing-DwarfCompileUnit.patch
- disable-bswap-for-spir.patch
- llvm-config.h)
-sha256sums=('ec6b80d82c384acad2dc192903a6cf2cdbaffb889b84bfb98da9d71e630fc834'
- 'SKIP'
- 'a7e902a7612d0fdabe436a917468b043cc296bc89d8954bfc3126f737beb9ac4'
- 'f7d69f84241416398fdb3df8bb44f9fae3c49d89889c7ffa3b37aa2e9d78f708'
- 'd1eff24508e35aae6c26a943dbaa3ef5acb60a145b008fd1ef9ac6f6c4faa662'
- 'af163392fbc19d65d11ab4b1510a2eae39b417d6228023b3ba5395b138bb41f5'
- '597dc5968c695bbdbb0eac9e8eb5117fcd2773bc91edf5ec103ecffffab8bc48')
-validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans at chromium.org>
-validpgpkeys+=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstellar at redhat.com>
-
-prepare() {
- cd "$srcdir/llvm-$pkgver.src"
- mkdir build
-
- # https://github.com/intel/intel-graphics-compiler/issues/204
- patch -Rp2 -i ../don-t-accept-nullptr-as-GEP-element-type.patch
-
- # https://github.com/llvm/llvm-project/issues/53243
- # https://github.com/rust-lang/rust/issues/92869
- patch -Np2 -i ../don-t-move-DBG_VALUE-instructions.patch
-
- # Work around intermittent 'clang -O -g' crashes
- # https://bugs.llvm.org/show_bug.cgi?id=50611#c3
- patch -Np2 -i ../no-strict-aliasing-DwarfCompileUnit.patch
-
- # Fix an ISPC build failure (https://github.com/ispc/ispc/issues/2189)
- patch -Np2 -i ../disable-bswap-for-spir.patch
-}
-
-build() {
- cd "$srcdir/llvm-$pkgver.src/build"
-
- cmake .. -G Ninja \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_SKIP_RPATH=ON \
- -DLLVM_HOST_TRIPLE=$CHOST \
- -DLLVM_BUILD_LLVM_DYLIB=ON \
- -DLLVM_LINK_LLVM_DYLIB=ON \
- -DLLVM_INSTALL_UTILS=ON \
- -DLLVM_ENABLE_RTTI=ON \
- -DLLVM_ENABLE_FFI=ON \
- -DLLVM_BUILD_TESTS=ON \
- -DLLVM_BUILD_DOCS=ON \
- -DLLVM_ENABLE_SPHINX=ON \
- -DLLVM_ENABLE_DOXYGEN=OFF \
- -DSPHINX_WARNINGS_AS_ERRORS=OFF \
- -DLLVM_BINUTILS_INCDIR=/usr/include
- ninja all ocaml_doc
-}
-
-check() {
- cd "$srcdir/llvm-$pkgver.src/build"
- LD_LIBRARY_PATH=$PWD/lib ninja check
-}
-
-package_llvm() {
- pkgdesc="Collection of modular and reusable compiler and toolchain technologies"
- depends=('llvm-libs' 'perl')
-
- cd "$srcdir/llvm-$pkgver.src/build"
-
- DESTDIR="$pkgdir" ninja install
-
- # Include lit for running lit-based tests in other projects
- pushd ../utils/lit
- python3 setup.py install --root="$pkgdir" -O1
- popd
-
- # Remove documentation sources
- rm -r "$pkgdir"/usr/share/doc/$pkgname/html/{_sources,.buildinfo}
-
- # The runtime libraries go into llvm-libs
- mv -f "$pkgdir"/usr/lib/lib{LLVM,LTO,Remarks}*.so* "$srcdir"
- mv -f "$pkgdir"/usr/lib/LLVMgold.so "$srcdir"
-
- # OCaml bindings go to a separate package
- rm -rf "$srcdir"/ocaml.{lib,doc}
- mv "$pkgdir/usr/lib/ocaml" "$srcdir/ocaml.lib"
- mv "$pkgdir/usr/share/doc/$pkgname/ocaml-html" "$srcdir/ocaml.doc"
-
- if [[ $CARCH == x86_64 ]]; then
- # Needed for multilib (https://bugs.archlinux.org/task/29951)
- # Header stub is taken from Fedora
- mv "$pkgdir/usr/include/llvm/Config/llvm-config"{,-64}.h
- cp "$srcdir/llvm-config.h" "$pkgdir/usr/include/llvm/Config/llvm-config.h"
- fi
-
- install -Dm644 ../LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}
-
-package_llvm-libs() {
- pkgdesc="LLVM runtime libraries"
- depends=('gcc-libs' 'zlib' 'libffi' 'libedit' 'ncurses' 'libxml2')
-
- install -d "$pkgdir/usr/lib"
- cp -P \
- "$srcdir"/lib{LLVM,LTO,Remarks}*.so* \
- "$srcdir"/LLVMgold.so \
- "$pkgdir/usr/lib/"
-
- # Symlink LLVMgold.so from /usr/lib/bfd-plugins
- # https://bugs.archlinux.org/task/28479
- install -d "$pkgdir/usr/lib/bfd-plugins"
- ln -s ../LLVMgold.so "$pkgdir/usr/lib/bfd-plugins/LLVMgold.so"
-
- install -Dm644 "$srcdir/llvm-$pkgver.src/LICENSE.TXT" \
- "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}
-
-package_llvm-ocaml() {
- pkgdesc="OCaml bindings for LLVM"
- depends=('llvm' "ocaml>=$_ocaml_ver" 'ocaml-ctypes')
-
- install -d "$pkgdir"/{usr/lib,usr/share/doc/$pkgname}
- cp -a "$srcdir/ocaml.lib" "$pkgdir/usr/lib/ocaml"
- cp -a "$srcdir/ocaml.doc" "$pkgdir/usr/share/doc/$pkgname/html"
-
- install -Dm644 "$srcdir/llvm-$pkgver.src/LICENSE.TXT" \
- "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}
-
-# vim:set ts=2 sw=2 et:
Copied: llvm/repos/extra-x86_64/PKGBUILD (from rev 445846, llvm/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2022-05-15 20:17:55 UTC (rev 445847)
@@ -0,0 +1,148 @@
+# Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
+# Contributor: Jan "heftig" Steffens <jan.steffens at gmail.com>
+
+pkgname=('llvm' 'llvm-libs' 'llvm-ocaml')
+pkgver=13.0.1
+pkgrel=3
+_ocaml_ver=4.13.1
+arch=('x86_64')
+url="https://llvm.org/"
+license=('custom:Apache 2.0 with LLVM Exception')
+makedepends=('cmake' 'ninja' 'libffi' 'libedit' 'ncurses' 'libxml2'
+ "ocaml>=$_ocaml_ver" 'ocaml-ctypes' 'ocaml-findlib'
+ 'python-setuptools' 'python-psutil' 'python-sphinx'
+ 'python-recommonmark')
+options=('staticlibs' '!lto') # Getting thousands of test failures with LTO
+_source_base=https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver
+source=($_source_base/$pkgname-$pkgver.src.tar.xz{,.sig}
+ don-t-accept-nullptr-as-GEP-element-type.patch
+ don-t-move-DBG_VALUE-instructions.patch
+ no-strict-aliasing-DwarfCompileUnit.patch
+ disable-A-B-A-B-and-BSWAP-in-InstCombine.patch
+ disable-DIArgList-in-SPIR-V.patch
+ llvm-config.h)
+sha256sums=('ec6b80d82c384acad2dc192903a6cf2cdbaffb889b84bfb98da9d71e630fc834'
+ 'SKIP'
+ 'a7e902a7612d0fdabe436a917468b043cc296bc89d8954bfc3126f737beb9ac4'
+ 'f7d69f84241416398fdb3df8bb44f9fae3c49d89889c7ffa3b37aa2e9d78f708'
+ 'd1eff24508e35aae6c26a943dbaa3ef5acb60a145b008fd1ef9ac6f6c4faa662'
+ '34cc0d79a30599cb2287b47b4e9a1a5bf03d57a1f8bb35be3fe976ffc4a604f6'
+ '8642da2d556092e4284873ba6ddc6c9a67841f42cc16f923bcd523e4b304a3ff'
+ '597dc5968c695bbdbb0eac9e8eb5117fcd2773bc91edf5ec103ecffffab8bc48')
+validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans at chromium.org>
+validpgpkeys+=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstellar at redhat.com>
+
+prepare() {
+ cd "$srcdir/llvm-$pkgver.src"
+ mkdir build
+
+ # https://github.com/intel/intel-graphics-compiler/issues/204
+ patch -Rp2 -i ../don-t-accept-nullptr-as-GEP-element-type.patch
+
+ # https://github.com/llvm/llvm-project/issues/53243
+ # https://github.com/rust-lang/rust/issues/92869
+ patch -Np2 -i ../don-t-move-DBG_VALUE-instructions.patch
+
+ # Work around intermittent 'clang -O -g' crashes
+ # https://bugs.llvm.org/show_bug.cgi?id=50611#c3
+ patch -Np2 -i ../no-strict-aliasing-DwarfCompileUnit.patch
+
+ # Patches needed for ISPC for Xe only
+ patch -Np2 -i ../disable-A-B-A-B-and-BSWAP-in-InstCombine.patch
+ patch -Np2 -i ../disable-DIArgList-in-SPIR-V.patch
+}
+
+build() {
+ cd "$srcdir/llvm-$pkgver.src/build"
+
+ cmake .. -G Ninja \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DLLVM_HOST_TRIPLE=$CHOST \
+ -DLLVM_BUILD_LLVM_DYLIB=ON \
+ -DLLVM_LINK_LLVM_DYLIB=ON \
+ -DLLVM_INSTALL_UTILS=ON \
+ -DLLVM_ENABLE_RTTI=ON \
+ -DLLVM_ENABLE_FFI=ON \
+ -DLLVM_BUILD_TESTS=ON \
+ -DLLVM_BUILD_DOCS=ON \
+ -DLLVM_ENABLE_SPHINX=ON \
+ -DLLVM_ENABLE_DOXYGEN=OFF \
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF \
+ -DLLVM_BINUTILS_INCDIR=/usr/include
+ ninja all ocaml_doc
+}
+
+check() {
+ cd "$srcdir/llvm-$pkgver.src/build"
+ LD_LIBRARY_PATH=$PWD/lib ninja check
+}
+
+package_llvm() {
+ pkgdesc="Collection of modular and reusable compiler and toolchain technologies"
+ depends=('llvm-libs' 'perl')
+
+ cd "$srcdir/llvm-$pkgver.src/build"
+
+ DESTDIR="$pkgdir" ninja install
+
+ # Include lit for running lit-based tests in other projects
+ pushd ../utils/lit
+ python3 setup.py install --root="$pkgdir" -O1
+ popd
+
+ # Remove documentation sources
+ rm -r "$pkgdir"/usr/share/doc/$pkgname/html/{_sources,.buildinfo}
+
+ # The runtime libraries go into llvm-libs
+ mv -f "$pkgdir"/usr/lib/lib{LLVM,LTO,Remarks}*.so* "$srcdir"
+ mv -f "$pkgdir"/usr/lib/LLVMgold.so "$srcdir"
+
+ # OCaml bindings go to a separate package
+ rm -rf "$srcdir"/ocaml.{lib,doc}
+ mv "$pkgdir/usr/lib/ocaml" "$srcdir/ocaml.lib"
+ mv "$pkgdir/usr/share/doc/$pkgname/ocaml-html" "$srcdir/ocaml.doc"
+
+ if [[ $CARCH == x86_64 ]]; then
+ # Needed for multilib (https://bugs.archlinux.org/task/29951)
+ # Header stub is taken from Fedora
+ mv "$pkgdir/usr/include/llvm/Config/llvm-config"{,-64}.h
+ cp "$srcdir/llvm-config.h" "$pkgdir/usr/include/llvm/Config/llvm-config.h"
+ fi
+
+ install -Dm644 ../LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_llvm-libs() {
+ pkgdesc="LLVM runtime libraries"
+ depends=('gcc-libs' 'zlib' 'libffi' 'libedit' 'ncurses' 'libxml2')
+
+ install -d "$pkgdir/usr/lib"
+ cp -P \
+ "$srcdir"/lib{LLVM,LTO,Remarks}*.so* \
+ "$srcdir"/LLVMgold.so \
+ "$pkgdir/usr/lib/"
+
+ # Symlink LLVMgold.so from /usr/lib/bfd-plugins
+ # https://bugs.archlinux.org/task/28479
+ install -d "$pkgdir/usr/lib/bfd-plugins"
+ ln -s ../LLVMgold.so "$pkgdir/usr/lib/bfd-plugins/LLVMgold.so"
+
+ install -Dm644 "$srcdir/llvm-$pkgver.src/LICENSE.TXT" \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_llvm-ocaml() {
+ pkgdesc="OCaml bindings for LLVM"
+ depends=('llvm' "ocaml>=$_ocaml_ver" 'ocaml-ctypes')
+
+ install -d "$pkgdir"/{usr/lib,usr/share/doc/$pkgname}
+ cp -a "$srcdir/ocaml.lib" "$pkgdir/usr/lib/ocaml"
+ cp -a "$srcdir/ocaml.doc" "$pkgdir/usr/share/doc/$pkgname/html"
+
+ install -Dm644 "$srcdir/llvm-$pkgver.src/LICENSE.TXT" \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:
Copied: llvm/repos/extra-x86_64/disable-A-B-A-B-and-BSWAP-in-InstCombine.patch (from rev 445846, llvm/trunk/disable-A-B-A-B-and-BSWAP-in-InstCombine.patch)
===================================================================
--- disable-A-B-A-B-and-BSWAP-in-InstCombine.patch (rev 0)
+++ disable-A-B-A-B-and-BSWAP-in-InstCombine.patch 2022-05-15 20:17:55 UTC (rev 445847)
@@ -0,0 +1,52 @@
+# This patch is needed for ISPC for Xe only
+
+# 1. Transformation of add to or is not safe for VC backend.
+# 2. bswap intrinsics is not supported in VC backend yet.
+diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
+index d01a021bf3f4..bccce825a03d 100644
+--- a/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
++++ b/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
+@@ -15,6 +15,7 @@
+ #include "llvm/ADT/APInt.h"
+ #include "llvm/ADT/STLExtras.h"
+ #include "llvm/ADT/SmallVector.h"
++#include "llvm/ADT/Triple.h"
+ #include "llvm/Analysis/InstructionSimplify.h"
+ #include "llvm/Analysis/ValueTracking.h"
+ #include "llvm/IR/Constant.h"
+@@ -1369,9 +1370,12 @@ Instruction *InstCombinerImpl::visitAdd(BinaryOperator &I) {
+ }
+ }
+
+- // A+B --> A|B iff A and B have no bits set in common.
+- if (haveNoCommonBitsSet(LHS, RHS, DL, &AC, &I, &DT))
+- return BinaryOperator::CreateOr(LHS, RHS);
++ // Disable this transformation for ISPC SPIR-V
++ if (!Triple(I.getModule()->getTargetTriple()).isSPIR()) {
++ // A+B --> A|B iff A and B have no bits set in common.
++ if (haveNoCommonBitsSet(LHS, RHS, DL, &AC, &I, &DT))
++ return BinaryOperator::CreateOr(LHS, RHS);
++ }
+
+ // add (select X 0 (sub n A)) A --> select X A n
+ {
+diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+index 120852c44474..8de55311ce3e 100644
+--- a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
++++ b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+@@ -2671,9 +2671,12 @@ Instruction *InstCombinerImpl::visitOr(BinaryOperator &I) {
+ if (Instruction *FoldedLogic = foldBinOpIntoSelectOrPhi(I))
+ return FoldedLogic;
+
+- if (Instruction *BitOp = matchBSwapOrBitReverse(I, /*MatchBSwaps*/ true,
+- /*MatchBitReversals*/ true))
+- return BitOp;
++ // Disable this transformation for ISPC SPIR-V
++ if (!Triple(I.getModule()->getTargetTriple()).isSPIR()) {
++ if (Instruction *BitOp = matchBSwapOrBitReverse(I, /*MatchBSwaps*/ true,
++ /*MatchBitReversals*/ true))
++ return BitOp;
++ }
+
+ if (Instruction *Funnel = matchFunnelShift(I, *this))
+ return Funnel;
Copied: llvm/repos/extra-x86_64/disable-DIArgList-in-SPIR-V.patch (from rev 445846, llvm/trunk/disable-DIArgList-in-SPIR-V.patch)
===================================================================
--- disable-DIArgList-in-SPIR-V.patch (rev 0)
+++ disable-DIArgList-in-SPIR-V.patch 2022-05-15 20:17:55 UTC (rev 445847)
@@ -0,0 +1,23 @@
+# This patch is needed for ISPC for Xe only
+# It disables using of DIArgList for dbg.val if SPIR-V target is used.
+# It is needed till DIArgList is supported in SPIR-V Translator.
+diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
+index d03d76f57ca1..0b86e454df57 100644
+--- a/llvm/lib/Transforms/Utils/Local.cpp
++++ b/llvm/lib/Transforms/Utils/Local.cpp
+@@ -1771,7 +1771,14 @@ void llvm::salvageDebugInfoForDbgValues(
+ } else if (isa<DbgValueInst>(DII) &&
+ DII->getNumVariableLocationOps() + AdditionalValues.size() <=
+ MaxDebugArgs) {
+- DII->addVariableLocationOps(AdditionalValues, SalvagedExpr);
++ if (!Triple(I.getModule()->getTargetTriple()).isSPIR()) {
++ DII->addVariableLocationOps(AdditionalValues, SalvagedExpr);
++ } else {
++ // Do not salvage using DIArgList for dbg.val fpr SPIR-V target, as it is
++ // not currently supported by SPIR-V Translator.
++ Value *Undef = UndefValue::get(I.getOperand(0)->getType());
++ DII->replaceVariableLocationOp(I.getOperand(0), Undef);
++ }
+ } else {
+ // Do not salvage using DIArgList for dbg.addr/dbg.declare, as it is
+ // currently only valid for stack value expressions.
Deleted: disable-bswap-for-spir.patch
===================================================================
--- disable-bswap-for-spir.patch 2022-05-15 20:17:45 UTC (rev 445846)
+++ disable-bswap-for-spir.patch 2022-05-15 20:17:55 UTC (rev 445847)
@@ -1,50 +0,0 @@
-# Based on https://github.com/ispc/ispc/blob/main/llvm_patches/12_0_disable-A-B-A-B-and-BSWAP-in-InstCombine.patch
-
-diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
-index d01a021bf3f4..bccce825a03d 100644
---- a/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
-+++ b/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
-@@ -15,6 +15,7 @@
- #include "llvm/ADT/APInt.h"
- #include "llvm/ADT/STLExtras.h"
- #include "llvm/ADT/SmallVector.h"
-+#include "llvm/ADT/Triple.h"
- #include "llvm/Analysis/InstructionSimplify.h"
- #include "llvm/Analysis/ValueTracking.h"
- #include "llvm/IR/Constant.h"
-@@ -1369,9 +1370,12 @@ Instruction *InstCombinerImpl::visitAdd(BinaryOperator &I) {
- }
- }
-
-- // A+B --> A|B iff A and B have no bits set in common.
-- if (haveNoCommonBitsSet(LHS, RHS, DL, &AC, &I, &DT))
-- return BinaryOperator::CreateOr(LHS, RHS);
-+ // Disable this transformation for ISPC SPIR-V
-+ if (!Triple(I.getModule()->getTargetTriple()).isSPIR()) {
-+ // A+B --> A|B iff A and B have no bits set in common.
-+ if (haveNoCommonBitsSet(LHS, RHS, DL, &AC, &I, &DT))
-+ return BinaryOperator::CreateOr(LHS, RHS);
-+ }
-
- // add (select X 0 (sub n A)) A --> select X A n
- {
-diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
-index 120852c44474..8de55311ce3e 100644
---- a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
-+++ b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
-@@ -2671,9 +2671,12 @@ Instruction *InstCombinerImpl::visitOr(BinaryOperator &I) {
- if (Instruction *FoldedLogic = foldBinOpIntoSelectOrPhi(I))
- return FoldedLogic;
-
-- if (Instruction *BitOp = matchBSwapOrBitReverse(I, /*MatchBSwaps*/ true,
-- /*MatchBitReversals*/ true))
-- return BitOp;
-+ // Disable this transformation for ISPC SPIR-V
-+ if (!Triple(I.getModule()->getTargetTriple()).isSPIR()) {
-+ if (Instruction *BitOp = matchBSwapOrBitReverse(I, /*MatchBSwaps*/ true,
-+ /*MatchBitReversals*/ true))
-+ return BitOp;
-+ }
-
- if (Instruction *Funnel = matchFunnelShift(I, *this))
- return Funnel;
Deleted: don-t-accept-nullptr-as-GEP-element-type.patch
===================================================================
--- don-t-accept-nullptr-as-GEP-element-type.patch 2022-05-15 20:17:45 UTC (rev 445846)
+++ don-t-accept-nullptr-as-GEP-element-type.patch 2022-05-15 20:17:55 UTC (rev 445847)
@@ -1,63 +0,0 @@
-From b00cff56cfb15cbfa74cb512c9cee1c402cce55b Mon Sep 17 00:00:00 2001
-From: Nikita Popov <nikita.ppv at gmail.com>
-Date: Thu, 8 Jul 2021 20:56:05 +0200
-Subject: [PATCH] Reapply [IR] Don't accept nullptr as GEP element type
-
-Reapply after fixing another occurrence in lldb that was relying
-on this in the preceding commit.
-
------
-
-GetElementPtrInst::Create() (and IRBuilder methods based on it)
-currently accept nullptr as the element type, and will fetch the
-element type from the pointer in that case. Remove this fallback,
-as it is incompatible with opaque pointers. I've removed a handful
-of leftover calls using this behavior as a preliminary step.
-
-Out-of-tree code affected by this change should either pass a proper
-type, or can temporarily explicitly call getPointerElementType(),
-if the newly added assertion is encountered.
-
-Differential Revision: https://reviews.llvm.org/D105653
----
- llvm/include/llvm/IR/Instructions.h | 20 ++++++--------------
- 1 file changed, 6 insertions(+), 14 deletions(-)
-
-diff --git a/llvm/include/llvm/IR/Instructions.h b/llvm/include/llvm/IR/Instructions.h
-index a5cebf0a4626..0c43a56daa33 100644
---- a/llvm/include/llvm/IR/Instructions.h
-+++ b/llvm/include/llvm/IR/Instructions.h
-@@ -956,13 +956,9 @@ public:
- const Twine &NameStr = "",
- Instruction *InsertBefore = nullptr) {
- unsigned Values = 1 + unsigned(IdxList.size());
-- if (!PointeeType) {
-- PointeeType =
-- cast<PointerType>(Ptr->getType()->getScalarType())->getElementType();
-- } else {
-- assert(cast<PointerType>(Ptr->getType()->getScalarType())
-- ->isOpaqueOrPointeeTypeMatches(PointeeType));
-- }
-+ assert(PointeeType && "Must specify element type");
-+ assert(cast<PointerType>(Ptr->getType()->getScalarType())
-+ ->isOpaqueOrPointeeTypeMatches(PointeeType));
- return new (Values) GetElementPtrInst(PointeeType, Ptr, IdxList, Values,
- NameStr, InsertBefore);
- }
-@@ -972,13 +968,9 @@ public:
- const Twine &NameStr,
- BasicBlock *InsertAtEnd) {
- unsigned Values = 1 + unsigned(IdxList.size());
-- if (!PointeeType) {
-- PointeeType =
-- cast<PointerType>(Ptr->getType()->getScalarType())->getElementType();
-- } else {
-- assert(cast<PointerType>(Ptr->getType()->getScalarType())
-- ->isOpaqueOrPointeeTypeMatches(PointeeType));
-- }
-+ assert(PointeeType && "Must specify element type");
-+ assert(cast<PointerType>(Ptr->getType()->getScalarType())
-+ ->isOpaqueOrPointeeTypeMatches(PointeeType));
- return new (Values) GetElementPtrInst(PointeeType, Ptr, IdxList, Values,
- NameStr, InsertAtEnd);
- }
Copied: llvm/repos/extra-x86_64/don-t-accept-nullptr-as-GEP-element-type.patch (from rev 445846, llvm/trunk/don-t-accept-nullptr-as-GEP-element-type.patch)
===================================================================
--- don-t-accept-nullptr-as-GEP-element-type.patch (rev 0)
+++ don-t-accept-nullptr-as-GEP-element-type.patch 2022-05-15 20:17:55 UTC (rev 445847)
@@ -0,0 +1,63 @@
+From b00cff56cfb15cbfa74cb512c9cee1c402cce55b Mon Sep 17 00:00:00 2001
+From: Nikita Popov <nikita.ppv at gmail.com>
+Date: Thu, 8 Jul 2021 20:56:05 +0200
+Subject: [PATCH] Reapply [IR] Don't accept nullptr as GEP element type
+
+Reapply after fixing another occurrence in lldb that was relying
+on this in the preceding commit.
+
+-----
+
+GetElementPtrInst::Create() (and IRBuilder methods based on it)
+currently accept nullptr as the element type, and will fetch the
+element type from the pointer in that case. Remove this fallback,
+as it is incompatible with opaque pointers. I've removed a handful
+of leftover calls using this behavior as a preliminary step.
+
+Out-of-tree code affected by this change should either pass a proper
+type, or can temporarily explicitly call getPointerElementType(),
+if the newly added assertion is encountered.
+
+Differential Revision: https://reviews.llvm.org/D105653
+---
+ llvm/include/llvm/IR/Instructions.h | 20 ++++++--------------
+ 1 file changed, 6 insertions(+), 14 deletions(-)
+
+diff --git a/llvm/include/llvm/IR/Instructions.h b/llvm/include/llvm/IR/Instructions.h
+index a5cebf0a4626..0c43a56daa33 100644
+--- a/llvm/include/llvm/IR/Instructions.h
++++ b/llvm/include/llvm/IR/Instructions.h
+@@ -956,13 +956,9 @@ public:
+ const Twine &NameStr = "",
+ Instruction *InsertBefore = nullptr) {
+ unsigned Values = 1 + unsigned(IdxList.size());
+- if (!PointeeType) {
+- PointeeType =
+- cast<PointerType>(Ptr->getType()->getScalarType())->getElementType();
+- } else {
+- assert(cast<PointerType>(Ptr->getType()->getScalarType())
+- ->isOpaqueOrPointeeTypeMatches(PointeeType));
+- }
++ assert(PointeeType && "Must specify element type");
++ assert(cast<PointerType>(Ptr->getType()->getScalarType())
++ ->isOpaqueOrPointeeTypeMatches(PointeeType));
+ return new (Values) GetElementPtrInst(PointeeType, Ptr, IdxList, Values,
+ NameStr, InsertBefore);
+ }
+@@ -972,13 +968,9 @@ public:
+ const Twine &NameStr,
+ BasicBlock *InsertAtEnd) {
+ unsigned Values = 1 + unsigned(IdxList.size());
+- if (!PointeeType) {
+- PointeeType =
+- cast<PointerType>(Ptr->getType()->getScalarType())->getElementType();
+- } else {
+- assert(cast<PointerType>(Ptr->getType()->getScalarType())
+- ->isOpaqueOrPointeeTypeMatches(PointeeType));
+- }
++ assert(PointeeType && "Must specify element type");
++ assert(cast<PointerType>(Ptr->getType()->getScalarType())
++ ->isOpaqueOrPointeeTypeMatches(PointeeType));
+ return new (Values) GetElementPtrInst(PointeeType, Ptr, IdxList, Values,
+ NameStr, InsertAtEnd);
+ }
Deleted: don-t-move-DBG_VALUE-instructions.patch
===================================================================
--- don-t-move-DBG_VALUE-instructions.patch 2022-05-15 20:17:45 UTC (rev 445846)
+++ don-t-move-DBG_VALUE-instructions.patch 2022-05-15 20:17:55 UTC (rev 445847)
@@ -1,91 +0,0 @@
-From e7c9a6cae09d99388d8384ca7c0fb5b24b353975 Mon Sep 17 00:00:00 2001
-From: Nikita Popov <npopov at redhat.com>
-Date: Mon, 17 Jan 2022 15:48:01 +0100
-Subject: [PATCH] [SDAG] Don't move DBG_VALUE instructions after insertion
- point during scheduling (PR53243)
-
-EmitSchedule() shouldn't be touching instructions after the provided
-insertion point. The change introduced in D83561 performs a scan to
-the end of the block, and thus may move unrelated instructions. In
-particular, this ends up moving instructions that have been produced
-by FastISel and will later be deleted. Moving them means that more
-instructions than intended are removed.
-
-Fix this by stopping the iteration when the insertion point is
-reached.
-
-Fixes https://github.com/llvm/llvm-project/issues/53243.
-
-Differential Revision: https://reviews.llvm.org/D117489
----
- .../SelectionDAG/ScheduleDAGSDNodes.cpp | 7 ++--
- .../CodeGen/X86/pr53243-tail-call-fastisel.ll | 39 +++++++++++++++++++
- 2 files changed, 43 insertions(+), 3 deletions(-)
- create mode 100644 llvm/test/CodeGen/X86/pr53243-tail-call-fastisel.ll
-
-diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
-index bec240d6c4d4..403f34573899 100644
---- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
-+++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
-@@ -1057,12 +1057,13 @@ EmitSchedule(MachineBasicBlock::iterator &InsertPos) {
- "first terminator cannot be a debug value");
- for (MachineInstr &MI : make_early_inc_range(
- make_range(std::next(FirstTerm), InsertBB->end()))) {
-+ // Only scan up to insertion point.
-+ if (&MI == InsertPos)
-+ break;
-+
- if (!MI.isDebugValue())
- continue;
-
-- if (&MI == InsertPos)
-- InsertPos = std::prev(InsertPos->getIterator());
--
- // The DBG_VALUE was referencing a value produced by a terminator. By
- // moving the DBG_VALUE, the referenced value also needs invalidating.
- MI.getOperand(0).ChangeToRegister(0, false);
-diff --git a/llvm/test/CodeGen/X86/pr53243-tail-call-fastisel.ll b/llvm/test/CodeGen/X86/pr53243-tail-call-fastisel.ll
-new file mode 100644
-index 000000000000..333eff8fb008
---- /dev/null
-+++ b/llvm/test/CodeGen/X86/pr53243-tail-call-fastisel.ll
-@@ -0,0 +1,39 @@
-+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-+; RUN: llc -O0 -fast-isel -mtriple=x86_64-- < %s | FileCheck %s
-+
-+define void @test() {
-+; CHECK-LABEL: test:
-+; CHECK: # %bb.0:
-+; CHECK-NEXT: jmp set_state at PLT # TAILCALL
-+ tail call void @set_state()
-+ call void @llvm.dbg.value(metadata i64 0, metadata !10, metadata !DIExpression()), !dbg !16
-+ ret void
-+}
-+
-+declare void @set_state()
-+
-+; Function Attrs: nofree nosync nounwind readnone speculatable willreturn
-+declare void @llvm.dbg.value(metadata, metadata, metadata) #0
-+
-+attributes #0 = { nofree nosync nounwind readnone speculatable willreturn }
-+
-+!llvm.module.flags = !{!0}
-+!llvm.dbg.cu = !{!1}
-+
-+!0 = !{i32 2, !"Debug Info Version", i32 3}
-+!1 = distinct !DICompileUnit(language: DW_LANG_Rust, file: !2, producer: "clang LLVM (rustc version 1.60.0-nightly (ec4bcaac4 2022-01-15))", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !3)
-+!2 = !DIFile(filename: "src/lib.rs/@/bug.63e521cd-cgu.0", directory: "/tmp/rust-bug")
-+!3 = !{!4}
-+!4 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "Option", file: !5, baseType: !6, size: 8, align: 8, flags: DIFlagEnumClass, elements: !7)
-+!5 = !DIFile(filename: "<unknown>", directory: "")
-+!6 = !DIBasicType(name: "u8", size: 8, encoding: DW_ATE_unsigned)
-+!7 = !{!8, !9}
-+!8 = !DIEnumerator(name: "None", value: 0)
-+!9 = !DIEnumerator(name: "Some", value: 1)
-+!10 = !DILocalVariable(name: "msg", arg: 2, scope: !11, file: !12, line: 689, type: !6)
-+!11 = distinct !DISubprogram(name: "expect<()>", linkageName: "_ZN4core6option15Option$LT$T$GT$6expect17h9a574c18f194c213E", scope: !4, file: !12, line: 689, type: !13, scopeLine: 689, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !1, templateParams: !15, retainedNodes: !15)
-+!12 = !DIFile(filename: "/rustc/ec4bcaac450279b029f3480b8b8f1b82ab36a5eb/library/core/src/option.rs", directory: "", checksumkind: CSK_MD5, checksum: "4120c8557937a0772190a676ec193800")
-+!13 = !DISubroutineType(types: !14)
-+!14 = !{null, !4}
-+!15 = !{}
-+!16 = !DILocation(line: 0, scope: !11)
Copied: llvm/repos/extra-x86_64/don-t-move-DBG_VALUE-instructions.patch (from rev 445846, llvm/trunk/don-t-move-DBG_VALUE-instructions.patch)
===================================================================
--- don-t-move-DBG_VALUE-instructions.patch (rev 0)
+++ don-t-move-DBG_VALUE-instructions.patch 2022-05-15 20:17:55 UTC (rev 445847)
@@ -0,0 +1,91 @@
+From e7c9a6cae09d99388d8384ca7c0fb5b24b353975 Mon Sep 17 00:00:00 2001
+From: Nikita Popov <npopov at redhat.com>
+Date: Mon, 17 Jan 2022 15:48:01 +0100
+Subject: [PATCH] [SDAG] Don't move DBG_VALUE instructions after insertion
+ point during scheduling (PR53243)
+
+EmitSchedule() shouldn't be touching instructions after the provided
+insertion point. The change introduced in D83561 performs a scan to
+the end of the block, and thus may move unrelated instructions. In
+particular, this ends up moving instructions that have been produced
+by FastISel and will later be deleted. Moving them means that more
+instructions than intended are removed.
+
+Fix this by stopping the iteration when the insertion point is
+reached.
+
+Fixes https://github.com/llvm/llvm-project/issues/53243.
+
+Differential Revision: https://reviews.llvm.org/D117489
+---
+ .../SelectionDAG/ScheduleDAGSDNodes.cpp | 7 ++--
+ .../CodeGen/X86/pr53243-tail-call-fastisel.ll | 39 +++++++++++++++++++
+ 2 files changed, 43 insertions(+), 3 deletions(-)
+ create mode 100644 llvm/test/CodeGen/X86/pr53243-tail-call-fastisel.ll
+
+diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
+index bec240d6c4d4..403f34573899 100644
+--- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
++++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
+@@ -1057,12 +1057,13 @@ EmitSchedule(MachineBasicBlock::iterator &InsertPos) {
+ "first terminator cannot be a debug value");
+ for (MachineInstr &MI : make_early_inc_range(
+ make_range(std::next(FirstTerm), InsertBB->end()))) {
++ // Only scan up to insertion point.
++ if (&MI == InsertPos)
++ break;
++
+ if (!MI.isDebugValue())
+ continue;
+
+- if (&MI == InsertPos)
+- InsertPos = std::prev(InsertPos->getIterator());
+-
+ // The DBG_VALUE was referencing a value produced by a terminator. By
+ // moving the DBG_VALUE, the referenced value also needs invalidating.
+ MI.getOperand(0).ChangeToRegister(0, false);
+diff --git a/llvm/test/CodeGen/X86/pr53243-tail-call-fastisel.ll b/llvm/test/CodeGen/X86/pr53243-tail-call-fastisel.ll
+new file mode 100644
+index 000000000000..333eff8fb008
+--- /dev/null
++++ b/llvm/test/CodeGen/X86/pr53243-tail-call-fastisel.ll
+@@ -0,0 +1,39 @@
++; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
++; RUN: llc -O0 -fast-isel -mtriple=x86_64-- < %s | FileCheck %s
++
++define void @test() {
++; CHECK-LABEL: test:
++; CHECK: # %bb.0:
++; CHECK-NEXT: jmp set_state at PLT # TAILCALL
++ tail call void @set_state()
++ call void @llvm.dbg.value(metadata i64 0, metadata !10, metadata !DIExpression()), !dbg !16
++ ret void
++}
++
++declare void @set_state()
++
++; Function Attrs: nofree nosync nounwind readnone speculatable willreturn
++declare void @llvm.dbg.value(metadata, metadata, metadata) #0
++
++attributes #0 = { nofree nosync nounwind readnone speculatable willreturn }
++
++!llvm.module.flags = !{!0}
++!llvm.dbg.cu = !{!1}
++
++!0 = !{i32 2, !"Debug Info Version", i32 3}
++!1 = distinct !DICompileUnit(language: DW_LANG_Rust, file: !2, producer: "clang LLVM (rustc version 1.60.0-nightly (ec4bcaac4 2022-01-15))", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !3)
++!2 = !DIFile(filename: "src/lib.rs/@/bug.63e521cd-cgu.0", directory: "/tmp/rust-bug")
++!3 = !{!4}
++!4 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "Option", file: !5, baseType: !6, size: 8, align: 8, flags: DIFlagEnumClass, elements: !7)
++!5 = !DIFile(filename: "<unknown>", directory: "")
++!6 = !DIBasicType(name: "u8", size: 8, encoding: DW_ATE_unsigned)
++!7 = !{!8, !9}
++!8 = !DIEnumerator(name: "None", value: 0)
++!9 = !DIEnumerator(name: "Some", value: 1)
++!10 = !DILocalVariable(name: "msg", arg: 2, scope: !11, file: !12, line: 689, type: !6)
++!11 = distinct !DISubprogram(name: "expect<()>", linkageName: "_ZN4core6option15Option$LT$T$GT$6expect17h9a574c18f194c213E", scope: !4, file: !12, line: 689, type: !13, scopeLine: 689, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !1, templateParams: !15, retainedNodes: !15)
++!12 = !DIFile(filename: "/rustc/ec4bcaac450279b029f3480b8b8f1b82ab36a5eb/library/core/src/option.rs", directory: "", checksumkind: CSK_MD5, checksum: "4120c8557937a0772190a676ec193800")
++!13 = !DISubroutineType(types: !14)
++!14 = !{null, !4}
++!15 = !{}
++!16 = !DILocation(line: 0, scope: !11)
Deleted: llvm-config.h
===================================================================
--- llvm-config.h 2022-05-15 20:17:45 UTC (rev 445846)
+++ llvm-config.h 2022-05-15 20:17:55 UTC (rev 445847)
@@ -1,9 +0,0 @@
-#include <bits/wordsize.h>
-
-#if __WORDSIZE == 32
-#include "llvm-config-32.h"
-#elif __WORDSIZE == 64
-#include "llvm-config-64.h"
-#else
-#error "Unknown word size"
-#endif
Copied: llvm/repos/extra-x86_64/llvm-config.h (from rev 445846, llvm/trunk/llvm-config.h)
===================================================================
--- llvm-config.h (rev 0)
+++ llvm-config.h 2022-05-15 20:17:55 UTC (rev 445847)
@@ -0,0 +1,9 @@
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 32
+#include "llvm-config-32.h"
+#elif __WORDSIZE == 64
+#include "llvm-config-64.h"
+#else
+#error "Unknown word size"
+#endif
Deleted: no-strict-aliasing-DwarfCompileUnit.patch
===================================================================
--- no-strict-aliasing-DwarfCompileUnit.patch 2022-05-15 20:17:45 UTC (rev 445846)
+++ no-strict-aliasing-DwarfCompileUnit.patch 2022-05-15 20:17:55 UTC (rev 445847)
@@ -1,13 +0,0 @@
-diff --git a/llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt b/llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt
-index eb924282a75e..85929b54d6ce 100644
---- a/llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt
-+++ b/llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt
-@@ -44,3 +44,8 @@ add_llvm_component_library(LLVMAsmPrinter
- Support
- Target
- )
-+
-+# https://bugs.llvm.org/show_bug.cgi?id=50611#c3
-+if (CMAKE_COMPILER_IS_GNUCXX)
-+ set_source_files_properties(DwarfCompileUnit.cpp PROPERTIES COMPILE_FLAGS -fno-strict-aliasing)
-+endif()
Copied: llvm/repos/extra-x86_64/no-strict-aliasing-DwarfCompileUnit.patch (from rev 445846, llvm/trunk/no-strict-aliasing-DwarfCompileUnit.patch)
===================================================================
--- no-strict-aliasing-DwarfCompileUnit.patch (rev 0)
+++ no-strict-aliasing-DwarfCompileUnit.patch 2022-05-15 20:17:55 UTC (rev 445847)
@@ -0,0 +1,13 @@
+diff --git a/llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt b/llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt
+index eb924282a75e..85929b54d6ce 100644
+--- a/llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt
++++ b/llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt
+@@ -44,3 +44,8 @@ add_llvm_component_library(LLVMAsmPrinter
+ Support
+ Target
+ )
++
++# https://bugs.llvm.org/show_bug.cgi?id=50611#c3
++if (CMAKE_COMPILER_IS_GNUCXX)
++ set_source_files_properties(DwarfCompileUnit.cpp PROPERTIES COMPILE_FLAGS -fno-strict-aliasing)
++endif()
More information about the arch-commits
mailing list