From c00db199b8d11ad4c9821163d3b2bbb8796c0c37 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Tue, 13 Oct 2020 19:03:42 +0000 Subject: [PATCH] llvm 11.0.0 - final release --- .gitignore | 2 + ...etToInt-Don-t-translate-Constant-s-o.patch | 99 ------------------- llvm.spec | 9 +- sources | 4 +- 4 files changed, 9 insertions(+), 105 deletions(-) delete mode 100644 0001-PowerPC-PPCBoolRetToInt-Don-t-translate-Constant-s-o.patch diff --git a/.gitignore b/.gitignore index ab17aa2..0f6bff1 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,5 @@ /llvm-10.0.0.src.tar.xz.sig /llvm-11.0.0rc1.src.tar.xz /llvm-11.0.0rc1.src.tar.xz.sig +/llvm-11.0.0.src.tar.xz +/llvm-11.0.0.src.tar.xz.sig diff --git a/0001-PowerPC-PPCBoolRetToInt-Don-t-translate-Constant-s-o.patch b/0001-PowerPC-PPCBoolRetToInt-Don-t-translate-Constant-s-o.patch deleted file mode 100644 index 07b96b8..0000000 --- a/0001-PowerPC-PPCBoolRetToInt-Don-t-translate-Constant-s-o.patch +++ /dev/null @@ -1,99 +0,0 @@ -From cbea17568f4301582c1d5d43990f089ca6cff522 Mon Sep 17 00:00:00 2001 -From: Kai Luo -Date: Fri, 28 Aug 2020 01:56:12 +0000 -Subject: [PATCH] [PowerPC] PPCBoolRetToInt: Don't translate Constant's - operands - -When collecting `i1` values via `findAllDefs`, ignore Constant's -operands, since Constant's operands 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 | 15 ++++++----- - llvm/test/CodeGen/PowerPC/pr46923.ll | 29 +++++++++++++++++++++ - 2 files changed, 38 insertions(+), 6 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 acc8b317a22..172f1346c50 100644 ---- a/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp -+++ b/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp -@@ -78,9 +78,9 @@ class PPCBoolRetToInt : public FunctionPass { - Value *Curr = WorkList.back(); - WorkList.pop_back(); - auto *CurrUser = dyn_cast(Curr); -- // Operands of CallInst are skipped because they may not be Bool type, -- // and their positions are defined by ABI. -- if (CurrUser && !isa(Curr)) -+ // Operands of CallInst/Constant are skipped because they may not be Bool -+ // type. For CallInst, their positions are defined by ABI. -+ if (CurrUser && !isa(Curr) && !isa(Curr)) - for (auto &Op : CurrUser->operands()) - if (Defs.insert(Op).second) - WorkList.push_back(Op); -@@ -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()); - -@@ -252,9 +255,9 @@ class PPCBoolRetToInt : public FunctionPass { - auto *First = dyn_cast(Pair.first); - auto *Second = dyn_cast(Pair.second); - assert((!First || Second) && "translated from user to non-user!?"); -- // Operands of CallInst are skipped because they may not be Bool type, -- // and their positions are defined by ABI. -- if (First && !isa(First)) -+ // Operands of CallInst/Constant are skipped because they may not be Bool -+ // type. For CallInst, their positions are defined by ABI. -+ if (First && !isa(First) && !isa(First)) - for (unsigned i = 0; i < First->getNumOperands(); ++i) - Second->setOperand(i, BoolToIntMap[First->getOperand(i)]); - } -diff --git a/llvm/test/CodeGen/PowerPC/pr46923.ll b/llvm/test/CodeGen/PowerPC/pr46923.ll -new file mode 100644 -index 00000000000..3e9faa60422 ---- /dev/null -+++ b/llvm/test/CodeGen/PowerPC/pr46923.ll -@@ -0,0 +1,29 @@ -+; 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: li r3, 0 -+; CHECK-NEXT: isel r3, 0, 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.25.2 - diff --git a/llvm.spec b/llvm.spec index 7866a82..67a2993 100644 --- a/llvm.spec +++ b/llvm.spec @@ -10,8 +10,8 @@ %global llvm_libdir %{_libdir}/%{name} %global build_llvm_libdir %{buildroot}%{llvm_libdir} -%global rc_ver 1 -%global baserelease 0.3 +#%%global rc_ver 1 +%global baserelease 0.4 %global llvm_srcdir llvm-%{version}%{?rc_ver:rc%{rc_ver}}.src %global maj_ver 11 %global min_ver 0 @@ -57,8 +57,6 @@ Source2: lit.fedora.cfg.py %endif Source4: https://prereleases.llvm.org/%{version}/hans-gpg-key.asc -Patch0: 0001-PowerPC-PPCBoolRetToInt-Don-t-translate-Constant-s-o.patch - BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake @@ -541,6 +539,9 @@ fi %endif %changelog +* Tue Oct 13 2020 sguelton@redhat.com - 11.0.0-0.4 +- llvm 11.0.0 - final release + * Fri Sep 04 2020 sguelton@redhat.com - 11.0.0-0.3.rc1 - Apply upstream patch for rhbz#1862012 diff --git a/sources b/sources index 67a9e7d..1a3cb47 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (llvm-11.0.0rc1.src.tar.xz) = 2e07ca946ca3865990670b82d265c8a024e116a052f533c652db025d248cc08c373e00d96eac2147e0ff74db29a874e85ec5d6a7ea10031908accf3b4165ebb3 -SHA512 (llvm-11.0.0rc1.src.tar.xz.sig) = a3dc7a832022b1f4470447daa00b0dd22c46583b213594a623335657ac68f37556b5d49df490ee13f21715863060e4ca6f1f98124fc0e272ddfa008aba274bbb +SHA512 (llvm-11.0.0.src.tar.xz) = b3e92091ac48772edc0c30801218ce646ef374e1968baab91df9005f58e11c3ce149b2c4c655c7001f8554fd337caa02c08783bc736153bf58f35fe008e624a4 +SHA512 (llvm-11.0.0.src.tar.xz.sig) = 4f585e5a4f75ec7ba55eeae49a715569ba93bcd9c68ef25ba28cb2627a08b96ca7dcc9935ba1dda6b92822c42de41dc59a0699dda6f62c2899f662f59a8d1175