From 1e30ac6a36822920a324a9762f0c5d71d795453f Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 27 2020 18:57:50 +0000 Subject: import llvm-10.0.1-3.module+el8.3.0+7719+53d428de --- diff --git a/.gitignore b/.gitignore index 9609a9c..35bc580 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -SOURCES/hans-gpg-key.asc -SOURCES/llvm-10.0.0.src.tar.xz +SOURCES/llvm-10.0.1.src.tar.xz diff --git a/.llvm.metadata b/.llvm.metadata index 0132433..5ca21e3 100644 --- a/.llvm.metadata +++ b/.llvm.metadata @@ -1,2 +1 @@ -32fa4b0193960f05064f2ab31b5a89c7cf48a0b9 SOURCES/hans-gpg-key.asc -85f2d89205fb190c61c8a98dad2a58e27a1540da SOURCES/llvm-10.0.0.src.tar.xz +25d07260f3b7bf4f647e115c4a663fdeda130fbd SOURCES/llvm-10.0.1.src.tar.xz diff --git a/SOURCES/0001-PowerPC-PPCBoolRetToInt-Skip-translation-if-there-is.patch b/SOURCES/0001-PowerPC-PPCBoolRetToInt-Skip-translation-if-there-is.patch new file mode 100644 index 0000000..4489dab --- /dev/null +++ b/SOURCES/0001-PowerPC-PPCBoolRetToInt-Skip-translation-if-there-is.patch @@ -0,0 +1,86 @@ +From cf54ca458afff1f7827bfbbc939429a00496c4f7 Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Tue, 18 Aug 2020 10:54:49 -0700 +Subject: [PATCH] [PowerPC] PPCBoolRetToInt: Skip translation if there is + ConstantExpr + +PPCBoolRetToInt collects PHI, Argument, Call and Constant defs related to an `i1` value which later is translated to an `i32`/`i64` value. The `translate` method expects an `i1` value. However, if the `Constant` is a `ConstantExpr`, the type of the `ConstantExpr` might not be `i1`. + +Fixes https://bugs.llvm.org/show_bug.cgi?id=46923 which causes ICE +``` +llvm-project/llvm/lib/IR/Constants.cpp:1924: static llvm::Constant *llvm::ConstantExpr::getZExt(llvm::Constant *, llvm::Type *, bool): Assertion `C->getType()->getScalarSizeInBits() < Ty->getScalarSizeInBits()&& "SrcTy must be smaller than DestTy for ZExt!"' failed. +``` + +Differential Revision: https://reviews.llvm.org/D85007 +--- + llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp | 8 ++++-- + llvm/test/CodeGen/PowerPC/pr46923.ll | 31 +++++++++++++++++++++ + 2 files changed, 37 insertions(+), 2 deletions(-) + create mode 100644 llvm/test/CodeGen/PowerPC/pr46923.ll + +diff --git a/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp b/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp +index 2259a29f838..cfe3b3ce2e9 100644 +--- a/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp ++++ b/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp +@@ -90,6 +90,9 @@ class PPCBoolRetToInt : public FunctionPass { + + // Translate a i1 value to an equivalent i32/i64 value: + Value *translate(Value *V) { ++ assert(V->getType() == Type::getInt1Ty(V->getContext()) && ++ "Expect an i1 value"); ++ + Type *IntTy = ST->isPPC64() ? Type::getInt64Ty(V->getContext()) + : Type::getInt32Ty(V->getContext()); + +@@ -227,8 +230,9 @@ class PPCBoolRetToInt : public FunctionPass { + // CallInst. Potentially, bitwise operations (AND, OR, XOR, NOT) and sign + // extension could also be handled in the future. + for (Value *V : Defs) +- if (!isa(V) && !isa(V) && +- !isa(V) && !isa(V)) ++ if ((!isa(V) && !isa(V) && !isa(V) && ++ !isa(V)) || ++ isa(V)) + return false; + + for (Value *V : Defs) +diff --git a/llvm/test/CodeGen/PowerPC/pr46923.ll b/llvm/test/CodeGen/PowerPC/pr46923.ll +new file mode 100644 +index 00000000000..d6f65508848 +--- /dev/null ++++ b/llvm/test/CodeGen/PowerPC/pr46923.ll +@@ -0,0 +1,31 @@ ++; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ++; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-unknown \ ++; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s ++ ++@bar = external constant i64, align 8 ++ ++define i1 @foo() { ++; CHECK-LABEL: foo: ++; CHECK: # %bb.0: # %entry ++; CHECK-NEXT: crxor 4*cr5+lt, 4*cr5+lt, 4*cr5+lt ++; CHECK-NEXT: li r3, 0 ++; CHECK-NEXT: li r4, 1 ++; CHECK-NEXT: isel r3, r4, r3, 4*cr5+lt ++; CHECK-NEXT: blr ++entry: ++ br label %next ++ ++next: ++ br i1 undef, label %true, label %false ++ ++true: ++ br label %end ++ ++false: ++ br label %end ++ ++end: ++ %a = phi i1 [ icmp ugt (i64 0, i64 ptrtoint (i64* @bar to i64)), %true ], ++ [ icmp ugt (i64 0, i64 2), %false ] ++ ret i1 %a ++} +-- +2.18.1 + diff --git a/SOURCES/hans-gpg-key.asc b/SOURCES/hans-gpg-key.asc new file mode 100644 index 0000000..2cf5255 --- /dev/null +++ b/SOURCES/hans-gpg-key.asc @@ -0,0 +1,7 @@ + +404 Not Found + +

404 Not Found

+
nginx/1.4.6 (Ubuntu)
+ + diff --git a/SOURCES/llvm-10.0.0.src.tar.xz.sig b/SOURCES/llvm-10.0.0.src.tar.xz.sig deleted file mode 100644 index 00138e7..0000000 Binary files a/SOURCES/llvm-10.0.0.src.tar.xz.sig and /dev/null differ diff --git a/SOURCES/llvm-10.0.1.src.tar.xz.sig b/SOURCES/llvm-10.0.1.src.tar.xz.sig new file mode 100644 index 0000000..d12fe88 Binary files /dev/null and b/SOURCES/llvm-10.0.1.src.tar.xz.sig differ diff --git a/SPECS/llvm.spec b/SPECS/llvm.spec index c52a9fa..c5843c0 100644 --- a/SPECS/llvm.spec +++ b/SPECS/llvm.spec @@ -11,11 +11,11 @@ %global llvm_libdir %{_libdir}/%{name} %global build_llvm_libdir %{buildroot}%{llvm_libdir} #%%global rc_ver 6 -%global baserelease 2 +%global baserelease 3 %global llvm_srcdir llvm-%{version}%{?rc_ver:rc%{rc_ver}}.src %global maj_ver 10 %global min_ver 0 -%global patch_ver 0 +%global patch_ver 1 %if %{with compat_build} %global pkg_name llvm%{maj_ver}.%{min_ver} @@ -67,6 +67,7 @@ Source4: https://prereleases.llvm.org/%{version}/hans-gpg-key.asc Patch2: 0001-CMake-Split-static-library-exports-into-their-own-ex.patch Patch3: 0001-CMake-Split-test-binary-exports-into-their-own-expor.patch Patch4: bab5908df544680ada0a3cf431f55aeccfbdb321.patch +Patch5: 0001-PowerPC-PPCBoolRetToInt-Skip-translation-if-there-is.patch # RHEL-specific patches. Patch101: 0001-Deactivate-markdown-doc.patch @@ -288,6 +289,9 @@ cd _build mkdir -p %{buildroot}/%{_bindir} mv %{buildroot}/%{_bindir}/llvm-config %{buildroot}/%{_bindir}/llvm-config-%{__isa_bits} +# ghost presence +touch %{buildroot}%{_bindir}/llvm-config + # Fix some man pages ln -s llvm-config.1 %{buildroot}%{_mandir}/man1/llvm-config-%{__isa_bits}.1 mv %{buildroot}%{_mandir}/man1/tblgen.1 %{buildroot}%{_mandir}/man1/llvm-tblgen.1 @@ -419,7 +423,7 @@ ninja check-all -C _build || \ %postun devel if [ $1 -eq 0 ]; then - %{_sbindir}/update-alternatives --remove llvm-config %{_bindir}/llvm-config + %{_sbindir}/update-alternatives --remove llvm-config %{_bindir}/llvm-config-%{__isa_bits} fi %endif @@ -430,6 +434,7 @@ fi %{_bindir}/* %if %{without compat_build} +%exclude %{_bindir}/llvm-config %exclude %{_bindir}/llvm-config-%{__isa_bits} %exclude %{_bindir}/not %exclude %{_bindir}/count @@ -464,6 +469,7 @@ fi %files devel %if %{without compat_build} +%ghost %{_bindir}/llvm-config %{_bindir}/llvm-config-%{__isa_bits} %{_mandir}/man1/llvm-config* %{_includedir}/llvm @@ -524,6 +530,15 @@ fi %endif %changelog +* Wed Aug 19 2020 Tom Stellard - 10.0.1-3 +- Fix rust crash on ppc64le compiling firefox + +* Fri Jul 31 2020 sguelton@redhat.com - 10.0.1-2 +- Fix llvm-config alternative handling, see rhbz#1859996 + +* Fri Jul 24 2020 sguelton@redhat.com - 10.0.1-1 +- 10.0.1 Release + * Wed Jun 24 2020 sguelton@redhat.com - 10.0.0-2 - Reproducible build of test.tar.gz, see rhbz#1820319