From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 05:40:57 2020 Received: (at submit) by debbugs.gnu.org; 29 Apr 2020 09:40:57 +0000 Received: from localhost ([127.0.0.1]:42448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTjD7-0006V3-FL for submit@debbugs.gnu.org; Wed, 29 Apr 2020 05:40:57 -0400 Received: from lists.gnu.org ([209.51.188.17]:43522) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTjD5-0006Uv-Md for submit@debbugs.gnu.org; Wed, 29 Apr 2020 05:40:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34870) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTjD5-0006Xn-69 for guix-patches@gnu.org; Wed, 29 Apr 2020 05:40:55 -0400 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTjD4-0000r4-5K for guix-patches@gnu.org; Wed, 29 Apr 2020 05:40:54 -0400 Received: from pat.zlotemysli.pl ([37.59.186.212]:49548) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTjD3-00007A-FX for guix-patches@gnu.org; Wed, 29 Apr 2020 05:40:53 -0400 Received: (qmail 25337 invoked by uid 1009); 29 Apr 2020 11:40:41 +0200 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25796. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.00865 secs); 29 Apr 2020 09:40:41 -0000 Received: from unknown (HELO localhost.localdomain) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with AES256-SHA encrypted SMTP; 29 Apr 2020 11:40:41 +0200 From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= To: guix-patches@gnu.org Subject: [PATCH 1/?] gnu: rust: Add 1.40 Date: Wed, 29 Apr 2020 11:40:21 +0200 Message-Id: <20200429094022.22294-1-kuba@kadziolka.net> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Qmailux-2.08st: added fake Content-Type header Content-Type: text/plain Received-SPF: none client-ip=37.59.186.212; envelope-from=kuba@kadziolka.net; helo=pat.zlotemysli.pl X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/29 05:40:45 X-ACL-Warn: Detected OS = Linux 3.1-3.10 X-Received-From: 37.59.186.212 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/rust.scm (rust-1.40): New variable. --- gnu/packages/rust.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) Debbugs note: I will send patches to add more versions to this bug number as I get them to work. diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 11522b933e..a82bfa5912 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -1176,4 +1176,38 @@ move around." (generate-all-checksums "vendor") #t))))))))) +(define-public rust-1.40 + (let ((base-rust + (rust-bootstrapped-package rust-1.39 "1.40.0" + "1ba9llwhqm49w7sz3z0gqscj039m53ky9wxzhaj11z6yg1ah15yx"))) + (package + (inherit base-rust) + (source + (origin + (inherit (package-source base-rust)) + ;; llvm-emscripten is no longer bundled, as that codegen backend + ;; got removed. + (snippet '(begin + (delete-file-recursively "src/llvm-project") + (delete-file-recursively "vendor/jemalloc-sys/jemalloc") + #t)))) + (arguments + ;; Rust 1.40 does not ship rustc-internal libraries by default + ;; (see rustc-dev-split). This means that librustc_driver.so is no + ;; longer available in lib/rustlib/$target/lib, which is the directory + ;; included in the runpath of librustc_codegen_llvm-llvm.so. + ;; This is detected by our validate-runpath phase as an error, but it + ;; is harmless as the codegen backend is loaded by librustc_driver.so + ;; itself, which must at that point have been already loaded. + ;; As such, we skip validating the runpath for Rust 1.40. + ;; Rust 1.41 stopped putting the codegen backend in a separate library, + ;; which makes this workaround only necessary for this release. + (cons* #:validate-runpath? #f + (substitute-keyword-arguments (package-arguments base-rust) + ((#:phases phases) + `(modify-phases ,phases + ;; The test got removed in commit 000fe63b6fc57b09828930cacbab20c2ee6e6d15 + ;; "Remove painful test that is not pulling its weight" + (delete 'remove-unsupported-tests))))))))) + (define-public rust rust-1.37) -- 2.26.2 From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 12:02:28 2020 Received: (at 40957) by debbugs.gnu.org; 29 Apr 2020 16:02:29 +0000 Received: from localhost ([127.0.0.1]:44377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTpAK-0003oV-JY for submit@debbugs.gnu.org; Wed, 29 Apr 2020 12:02:28 -0400 Received: from pat.zlotemysli.pl ([37.59.186.212]:50998) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTpAI-0003mM-Hi for 40957@debbugs.gnu.org; Wed, 29 Apr 2020 12:02:27 -0400 Received: (qmail 23529 invoked by uid 1009); 29 Apr 2020 18:02:24 +0200 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25796. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.009014 secs); 29 Apr 2020 16:02:24 -0000 Received: from unknown (HELO localhost.localdomain) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with AES256-SHA encrypted SMTP; 29 Apr 2020 18:02:24 +0200 From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= To: 40957@debbugs.gnu.org Subject: [PATCH 2/?] gnu: rust: Add 1.41 Date: Wed, 29 Apr 2020 18:02:18 +0200 Message-Id: <20200429160218.15270-1-kuba@kadziolka.net> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Qmailux-2.08st: added fake Content-Type header Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40957 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --- gnu/packages/rust.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index a82bfa5912..78cfdfc97a 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -1210,4 +1210,37 @@ move around." ;; "Remove painful test that is not pulling its weight" (delete 'remove-unsupported-tests))))))))) +(define-public rust-1.41 + (let ((base-rust + (rust-bootstrapped-package rust-1.40 "1.41.1" + "0ws5x0fxv57fyllsa6025h3q6j9v3m8nb3syl4x0hgkddq0kvj9q"))) + (package + (inherit base-rust) + (arguments + (substitute-keyword-arguments (package-arguments base-rust) + ((#:validate-runpath? _) #t) + ((#:phases phases) + `(modify-phases ,phases + ;; The tests got moved. + (replace 'patch-command-exec-tests + ,(patch-command-exec-tests-phase + "src/test/ui/command/command-exec.rs")) + (replace 'patch-command-uid-gid-test + (lambda _ + (substitute* "src/test/ui/command/command-uid-gid.rs" + (("/bin/sh") (which "sh")) + (("ignore-sgx") "ignore-sgx\n// ignore-tidy-linelength")) + #t)) + ;; The test in question got fixed long ago, no need to chase it + ;; after renames. + (delete 'disable-cargo-test-for-nightly-channel) + ;; The patch-tests phase in rust-1.19 uses the fragile approach + ;; of inserting additional newlines instead of disabling the tidy + ;; check. Fixing this retroactively requires painful rebuilds. + (add-after 'patch-tests 'ignore-tidy-linelength + (lambda _ + (let ((port (open-file "src/libstd/process.rs" "a"))) + (display "// ignore-tidy-linelength\n" port)) + #t))))))))) + (define-public rust rust-1.37) -- 2.26.2 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 20 16:44:55 2020 Received: (at 40957) by debbugs.gnu.org; 20 Jun 2020 20:44:55 +0000 Received: from localhost ([127.0.0.1]:58816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmkMA-0005yx-Pg for submit@debbugs.gnu.org; Sat, 20 Jun 2020 16:44:55 -0400 Received: from pat.zlotemysli.pl ([37.59.186.212]:52544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmkM5-0005yi-3H for 40957@debbugs.gnu.org; Sat, 20 Jun 2020 16:44:53 -0400 Received: (qmail 18661 invoked by uid 1009); 20 Jun 2020 22:44:46 +0200 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25848. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.017708 secs); 20 Jun 2020 20:44:46 -0000 Received: from unknown (HELO localhost.localdomain) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with AES256-SHA encrypted SMTP; 20 Jun 2020 22:44:46 +0200 From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= To: 40957@debbugs.gnu.org Subject: [PATCH v2 1/2] gnu: llvm-9: Backport patches to fix miscompilations. Date: Sat, 20 Jun 2020 22:44:40 +0200 Message-Id: <20200620204440.4940-1-kuba@kadziolka.net> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40957 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/llvm.scm (llvm-9)[source]: Add new patches. * gnu/packages/patches/llvm-9-fix-lpad-miscompilation.patch, gnu/packages/patches/llvm-9-fix-scev-miscompilation.patch: New files. * gnu/local.mk (dist_patch_DATA): Register new patches. --- gnu/local.mk | 2 + gnu/packages/llvm.scm | 7 +- .../llvm-9-fix-lpad-miscompilation.patch | 97 +++++++++++++++ .../llvm-9-fix-scev-miscompilation.patch | 113 ++++++++++++++++++ 4 files changed, 218 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/llvm-9-fix-lpad-miscompilation.patch create mode 100644 gnu/packages/patches/llvm-9-fix-scev-miscompilation.patch diff --git a/gnu/local.mk b/gnu/local.mk index fd3cc88af5..0b4a6c789f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1226,6 +1226,8 @@ dist_patch_DATA = \ %D%/packages/patches/lirc-localstatedir.patch \ %D%/packages/patches/lirc-reproducible-build.patch \ %D%/packages/patches/llvm-3.5-fix-clang-build-with-gcc5.patch \ + %D%/packages/patches/llvm-9-fix-lpad-miscompilation.patch \ + %D%/packages/patches/llvm-9-fix-scev-miscompilation.patch \ %D%/packages/patches/lm-sensors-hwmon-attrs.patch \ %D%/packages/patches/lrcalc-includes.patch \ %D%/packages/patches/lrzip-CVE-2017-8842.patch \ diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 11e4cfbe4c..7723ff5bc1 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -15,6 +15,7 @@ ;;; Copyright © 2019 Mathieu Othacehe ;;; Copyright © 2019 Brett Gilio ;;; Copyright © 2020 Giacomo Leidi +;;; Copyright © 2020 Jakub Kądziołka ;;; ;;; This file is part of GNU Guix. ;;; @@ -510,7 +511,11 @@ output), and Binutils.") (uri (llvm-download-uri "llvm" version)) (sha256 (base32 - "16hwp3qa54c3a3v7h8nlw0fh5criqh0hlr1skybyk0cz70gyx880")))))) + "16hwp3qa54c3a3v7h8nlw0fh5criqh0hlr1skybyk0cz70gyx880")) + (patch-flags '("-p2")) + (patches (search-patches + "llvm-9-fix-scev-miscompilation.patch" + "llvm-9-fix-lpad-miscompilation.patch")))))) (define-public clang-runtime-9 (clang-runtime-from-llvm diff --git a/gnu/packages/patches/llvm-9-fix-lpad-miscompilation.patch b/gnu/packages/patches/llvm-9-fix-lpad-miscompilation.patch new file mode 100644 index 0000000000..6cfe07e50a --- /dev/null +++ b/gnu/packages/patches/llvm-9-fix-lpad-miscompilation.patch @@ -0,0 +1,97 @@ +From 011fb5bf8b31316472fccb1a19c91912246df9b2 Mon Sep 17 00:00:00 2001 +From: Reid Kleckner +Date: Sat, 28 Mar 2020 11:03:14 -0700 +Subject: [PATCH] [CodeGen] Fix sinking local values in lpads with phis + +There was already a test case for landingpads to handle this case, but I +had forgotten to consider PHI instructions preceding the EH_LABEL in the +landingpad. + +PR45261 +--- + llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 17 +++++++++- + llvm/test/CodeGen/X86/sink-local-value.ll | 36 ++++++++++++++++++++++ + 2 files changed, 52 insertions(+), 1 deletion(-) + +diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +index 5ac3606dc662..2638b1e8a05c 100644 +--- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp ++++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +@@ -225,6 +225,21 @@ static bool isRegUsedByPhiNodes(unsigned DefReg, + return false; + } + ++static bool isTerminatingEHLabel(MachineBasicBlock *MBB, MachineInstr &MI) { ++ // Ignore non-EH labels. ++ if (!MI.isEHLabel()) ++ return false; ++ ++ // Any EH label outside a landing pad must be for an invoke. Consider it a ++ // terminator. ++ if (!MBB->isEHPad()) ++ return true; ++ ++ // If this is a landingpad, the first non-phi instruction will be an EH_LABEL. ++ // Don't consider that label to be a terminator. ++ return MI.getIterator() != MBB->getFirstNonPHI(); ++} ++ + /// Build a map of instruction orders. Return the first terminator and its + /// order. Consider EH_LABEL instructions to be terminators as well, since local + /// values for phis after invokes must be materialized before the call. +@@ -233,7 +248,7 @@ void FastISel::InstOrderMap::initialize( + unsigned Order = 0; + for (MachineInstr &I : *MBB) { + if (!FirstTerminator && +- (I.isTerminator() || (I.isEHLabel() && &I != &MBB->front()))) { ++ (I.isTerminator() || isTerminatingEHLabel(MBB, I))) { + FirstTerminator = &I; + FirstTerminatorOrder = Order; + } +diff --git a/llvm/test/CodeGen/X86/sink-local-value.ll b/llvm/test/CodeGen/X86/sink-local-value.ll +index b0e511ac1189..f7d861ac9b6c 100644 +--- a/llvm/test/CodeGen/X86/sink-local-value.ll ++++ b/llvm/test/CodeGen/X86/sink-local-value.ll +@@ -145,6 +145,42 @@ try.cont: ; preds = %entry, %lpad + ; CHECK: retl + + ++define i32 @lpad_phi() personality i32 (...)* @__gxx_personality_v0 { ++entry: ++ store i32 42, i32* @sink_across ++ invoke void @may_throw() ++ to label %try.cont unwind label %lpad ++ ++lpad: ; preds = %entry ++ %p = phi i32 [ 11, %entry ] ; Trivial, but -O0 keeps it ++ %0 = landingpad { i8*, i32 } ++ catch i8* null ++ store i32 %p, i32* @sink_across ++ br label %try.cont ++ ++try.cont: ; preds = %entry, %lpad ++ %r.0 = phi i32 [ 13, %entry ], [ 55, %lpad ] ++ ret i32 %r.0 ++} ++ ++; The constant materialization should be *after* the stores to sink_across, but ++; before any EH_LABEL. ++ ++; CHECK-LABEL: lpad_phi: ++; CHECK: movl $42, sink_across ++; CHECK: movl $13, %{{[a-z]*}} ++; CHECK: .Ltmp{{.*}}: ++; CHECK: calll may_throw ++; CHECK: .Ltmp{{.*}}: ++; CHECK: jmp .LBB{{.*}} ++; CHECK: .LBB{{.*}}: # %lpad ++; CHECK-NEXT: .Ltmp{{.*}}: ++; CHECK: movl {{.*}}, sink_across ++; CHECK: movl $55, %{{[a-z]*}} ++; CHECK: .LBB{{.*}}: # %try.cont ++; CHECK: retl ++ ++ + ; Function Attrs: nounwind readnone speculatable + declare void @llvm.dbg.value(metadata, metadata, metadata) #0 + diff --git a/gnu/packages/patches/llvm-9-fix-scev-miscompilation.patch b/gnu/packages/patches/llvm-9-fix-scev-miscompilation.patch new file mode 100644 index 0000000000..3f16de5a2b --- /dev/null +++ b/gnu/packages/patches/llvm-9-fix-scev-miscompilation.patch @@ -0,0 +1,113 @@ +Guix note: this got detected with the test suite of rustc 1.41.1, but +the issue potentially affects all consumers of LLVM. + +From 58e8c793d0e43150a6452e971a32d7407a8a7401 Mon Sep 17 00:00:00 2001 +From: Tim Northover +Date: Mon, 30 Sep 2019 07:46:52 +0000 +Subject: [PATCH] Revert "[SCEV] add no wrap flag for SCEVAddExpr." + +This reverts r366419 because the analysis performed is within the context of +the loop and it's only valid to add wrapping flags to "global" expressions if +they're always correct. + +llvm-svn: 373184 +--- + llvm/lib/Analysis/ScalarEvolution.cpp | 2 +- + llvm/test/Analysis/ScalarEvolution/limit-depth.ll | 2 +- + llvm/test/Analysis/ScalarEvolution/nsw.ll | 2 +- + llvm/test/Analysis/ScalarEvolution/trip-count12.ll | 2 +- + llvm/test/Analysis/ScalarEvolution/trip-count9.ll | 8 ++++---- + 5 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp +index 354ae05bb841..c29fc5dbccfb 100644 +--- a/llvm/lib/Analysis/ScalarEvolution.cpp ++++ b/llvm/lib/Analysis/ScalarEvolution.cpp +@@ -4992,7 +4992,7 @@ const SCEV *ScalarEvolution::createSimpleAffineAddRec(PHINode *PN, + // overflow. + if (auto *BEInst = dyn_cast(BEValueV)) + if (isLoopInvariant(Accum, L) && isAddRecNeverPoison(BEInst, L)) +- (void)getAddRecExpr(getAddExpr(StartVal, Accum, Flags), Accum, L, Flags); ++ (void)getAddRecExpr(getAddExpr(StartVal, Accum), Accum, L, Flags); + + return PHISCEV; + } +diff --git a/llvm/test/Analysis/ScalarEvolution/limit-depth.ll b/llvm/test/Analysis/ScalarEvolution/limit-depth.ll +index db68a4f84c91..6fdf8c5df974 100644 +--- a/llvm/test/Analysis/ScalarEvolution/limit-depth.ll ++++ b/llvm/test/Analysis/ScalarEvolution/limit-depth.ll +@@ -46,7 +46,7 @@ define void @test_mul(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f) { + define void @test_sext(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f) { + ; CHECK-LABEL: @test_sext + ; CHECK: %se2 = sext i64 %iv2.inc to i128 +-; CHECK-NEXT: --> {(1 + (sext i64 {(sext i32 (1 + %a) to i64),+,1}<%loop> to i128)),+,1}<%loop2> ++; CHECK-NEXT: --> {(1 + (sext i64 {(sext i32 (1 + %a) to i64),+,1}<%loop> to i128)),+,1}<%loop2> + entry: + br label %loop + +diff --git a/llvm/test/Analysis/ScalarEvolution/nsw.ll b/llvm/test/Analysis/ScalarEvolution/nsw.ll +index 69427368625d..ca24f9d4a04b 100644 +--- a/llvm/test/Analysis/ScalarEvolution/nsw.ll ++++ b/llvm/test/Analysis/ScalarEvolution/nsw.ll +@@ -163,7 +163,7 @@ bb5: ; preds = %bb2 + declare void @f(i32) + + ; CHECK-LABEL: nswnowrap +-; CHECK: --> {(1 + %v),+,1}<%for.body>{{ U: [^ ]+ S: [^ ]+}}{{ *}}Exits: (2 + %v) ++; CHECK: --> {(1 + %v),+,1}<%for.body>{{ U: [^ ]+ S: [^ ]+}}{{ *}}Exits: (1 + ((1 + %v) smax %v)) + define void @nswnowrap(i32 %v, i32* %buf) { + entry: + %add = add nsw i32 %v, 1 +diff --git a/llvm/test/Analysis/ScalarEvolution/trip-count12.ll b/llvm/test/Analysis/ScalarEvolution/trip-count12.ll +index 5e7d72d5e4f3..d0086ee2e6ac 100644 +--- a/llvm/test/Analysis/ScalarEvolution/trip-count12.ll ++++ b/llvm/test/Analysis/ScalarEvolution/trip-count12.ll +@@ -1,7 +1,7 @@ + ; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s + + ; CHECK: Determining loop execution counts for: @test +-; CHECK: Loop %for.body: backedge-taken count is ((-2 + %len) /u 2) ++; CHECK: Loop %for.body: backedge-taken count is ((-2 + %len) /u 2) + ; CHECK: Loop %for.body: max backedge-taken count is 1073741823 + + define zeroext i16 @test(i16* nocapture %p, i32 %len) nounwind readonly { +diff --git a/llvm/test/Analysis/ScalarEvolution/trip-count9.ll b/llvm/test/Analysis/ScalarEvolution/trip-count9.ll +index c0a1d12fa00e..9a080b34743f 100644 +--- a/llvm/test/Analysis/ScalarEvolution/trip-count9.ll ++++ b/llvm/test/Analysis/ScalarEvolution/trip-count9.ll +@@ -179,7 +179,7 @@ exit: + } + + ; CHECK: Determining loop execution counts for: @nsw_startx +-; CHECK: Loop %loop: backedge-taken count is (-1 + (-1 * %x) + ((1 + %x) smax %n)) ++; CHECK: Loop %loop: backedge-taken count is (-1 + (-1 * %x) + ((1 + %x) smax %n)) + ; CHECK: Loop %loop: max backedge-taken count is -1 + define void @nsw_startx(i4 %n, i4 %x) { + entry: +@@ -195,7 +195,7 @@ exit: + } + + ; CHECK: Determining loop execution counts for: @nsw_startx_step2 +-; CHECK: Loop %loop: backedge-taken count is ((-1 + (-1 * %x) + ((2 + %x) smax %n)) /u 2) ++; CHECK: Loop %loop: backedge-taken count is ((-1 + (-1 * %x) + ((2 + %x) smax %n)) /u 2) + ; CHECK: Loop %loop: max backedge-taken count is 7 + define void @nsw_startx_step2(i4 %n, i4 %x) { + entry: +@@ -381,7 +381,7 @@ exit: + } + + ; CHECK: Determining loop execution counts for: @even_nsw_startx +-; CHECK: Loop %loop: backedge-taken count is (-1 + (-1 * %x) + ((1 + %x) smax (2 * %n))) ++; CHECK: Loop %loop: backedge-taken count is (-1 + (-1 * %x) + ((1 + %x) smax (2 * %n))) + ; CHECK: Loop %loop: max backedge-taken count is -2 + define void @even_nsw_startx(i4 %n, i4 %x) { + entry: +@@ -398,7 +398,7 @@ exit: + } + + ; CHECK: Determining loop execution counts for: @even_nsw_startx_step2 +-; CHECK: Loop %loop: backedge-taken count is ((-1 + (-1 * %x) + ((2 + %x) smax (2 * %n))) /u 2) ++; CHECK: Loop %loop: backedge-taken count is ((-1 + (-1 * %x) + ((2 + %x) smax (2 * %n))) /u 2) + ; CHECK: Loop %loop: max backedge-taken count is 7 + define void @even_nsw_startx_step2(i4 %n, i4 %x) { + entry: -- 2.26.2 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 20 16:45:04 2020 Received: (at 40957) by debbugs.gnu.org; 20 Jun 2020 20:45:05 +0000 Received: from localhost ([127.0.0.1]:58819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmkMF-0005zG-EJ for submit@debbugs.gnu.org; Sat, 20 Jun 2020 16:45:04 -0400 Received: from pat.zlotemysli.pl ([37.59.186.212]:52610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmkMD-0005z6-2g for 40957@debbugs.gnu.org; Sat, 20 Jun 2020 16:44:58 -0400 Received: (qmail 18762 invoked by uid 1009); 20 Jun 2020 22:44:56 +0200 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25848. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.013985 secs); 20 Jun 2020 20:44:56 -0000 Received: from unknown (HELO localhost.localdomain) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with AES256-SHA encrypted SMTP; 20 Jun 2020 22:44:55 +0200 From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= To: 40957@debbugs.gnu.org Subject: [PATCH v2 2/2] gnu: rust: Bootstrap up to rustc 1.44. Date: Sat, 20 Jun 2020 22:44:54 +0200 Message-Id: <20200620204454.5847-1-kuba@kadziolka.net> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40957 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/rust.scm (rust-1.40, rust-1.41, rust-1.42, rust-1.43, rust-1.44): New variables. --- gnu/packages/rust.scm | 100 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index d139657f39..1f85332583 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2018 Danny Milosavljevic ;;; Copyright © 2019 Ivan Petkov +;;; Copyright © 2020 Jakub Kądziołka ;;; ;;; This file is part of GNU Guix. ;;; @@ -797,6 +798,7 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\" (("fn finds_author_git") "#[ignore]\nfn finds_author_git") (("fn finds_local_author_git") "#[ignore]\nfn finds_local_author_git")) #t)) + ;; TODO(rebuild-rust): Remove this phase in rust-1.28 when rebuilding. (add-after 'patch-cargo-tests 'disable-cargo-test-for-nightly-channel (lambda* _ ;; This test failed to work on "nightly" channel builds @@ -1143,12 +1145,16 @@ move around." (setenv "CARGO_HOME" cargo-home) #t)))))))))) +;; TODO(rebuild-rust): Switch to LLVM 9 in 1.38 instead of 1.40. (define-public rust-1.38 (let ((base-rust (rust-bootstrapped-package rust-1.37 "1.38.0" "101dlpsfkq67p0hbwx4acqq6n90dj4bbprndizpgh1kigk566hk4"))) (package (inherit base-rust) + #;(inputs + (alist-replace "llvm" (list llvm-9) + (package-inputs base-rust))) (arguments (substitute-keyword-arguments (package-arguments base-rust) ((#:phases phases) @@ -1183,4 +1189,98 @@ move around." (generate-all-checksums "vendor") #t))))))))) +(define-public rust-1.40 + (let ((base-rust + (rust-bootstrapped-package rust-1.39 "1.40.0" + "1ba9llwhqm49w7sz3z0gqscj039m53ky9wxzhaj11z6yg1ah15yx"))) + (package + (inherit base-rust) + (inputs + (alist-replace "llvm" (list llvm-9) + (package-inputs base-rust))) + (source + (origin + (inherit (package-source base-rust)) + ;; llvm-emscripten is no longer bundled, as that codegen backend + ;; got removed. + (snippet '(begin + (delete-file-recursively "src/llvm-project") + (delete-file-recursively "vendor/jemalloc-sys/jemalloc") + #t)))) + (arguments + ;; Rust 1.40 does not ship rustc-internal libraries by default + ;; (see rustc-dev-split). This means that librustc_driver.so is no + ;; longer available in lib/rustlib/$target/lib, which is the directory + ;; included in the runpath of librustc_codegen_llvm-llvm.so. + ;; This is detected by our validate-runpath phase as an error, but it + ;; is harmless as the codegen backend is loaded by librustc_driver.so + ;; itself, which must at that point have been already loaded. + ;; As such, we skip validating the runpath for Rust 1.40. + ;; Rust 1.41 stopped putting the codegen backend in a separate library, + ;; which makes this workaround only necessary for this release. + (cons* #:validate-runpath? #f + (substitute-keyword-arguments (package-arguments base-rust) + ((#:phases phases) + `(modify-phases ,phases + ;; We often need to patch tests with various Guix-specific paths. + ;; This often increases the line length and makes tidy, rustc's + ;; style checker, complain. We could insert additional newlines + ;; or add an "// ignore-tidy-linelength" comment, but as an + ;; ignore comment must be used, both approaches are fragile due + ;; to upstream formatting changes. As such, disable running the + ;; linter during tests, since it's intended for rustc developers + ;; anyway. + ;; + ;; TODO(rebuild-rust): This phase could be added earlier to + ;; simplify a significant amount of code, but it would require + ;; rebuilding the entire rusty universe. + (add-after 'patch-tests 'neuter-tidy + (lambda _ + (substitute* "src/bootstrap/builder.rs" + (("^.*::Tidy,") "")) + #t)) + ;; TODO(rebuild-rust): Adapt the find-files approach for + ;; earlier testsuite patches. + (replace 'patch-command-uid-gid-test + (lambda _ + (match (find-files "src/test" "command-uid-gid\\.rs") + ((file) + (substitute* file + (("/bin/sh") (which "sh"))))) + #t)) + (replace 'patch-command-exec-tests + ,(patch-command-exec-tests-phase + '(match (find-files "src/test" "command-exec\\.rs") + ((file) file)))) + ;; TODO(rebuild-rust): The test in question got fixed long ago. + (delete 'disable-cargo-test-for-nightly-channel) + ;; The test got removed in commit 000fe63b6fc57b09828930cacbab20c2ee6e6d15 + ;; "Remove painful test that is not pulling its weight" + (delete 'remove-unsupported-tests))))))))) + +(define-public rust-1.41 + (let ((base-rust + (rust-bootstrapped-package rust-1.40 "1.41.1" + "0ws5x0fxv57fyllsa6025h3q6j9v3m8nb3syl4x0hgkddq0kvj9q"))) + (package + (inherit base-rust) + (arguments + (substitute-keyword-arguments (package-arguments base-rust) + ((#:validate-runpath? _) #t)))))) + +(define-public rust-1.42 + (rust-bootstrapped-package rust-1.41 "1.42.0" + "0x9lxs82may6c0iln0b908cxyn1cv7h03n5cmbx3j1bas4qzks6j")) + +(define-public rust-1.43 + (rust-bootstrapped-package rust-1.42 "1.43.0" + "18akhk0wz1my6y9vhardriy2ysc482z0fnjdcgs9gy59kmnarxkm")) + +(define-public rust-1.44 + (rust-bootstrapped-package rust-1.43 "1.44.0" + "000iavc6m6aikyh6nvndz6qxm7x9a51pvg65cx0yhcz52wizcbdz")) + +;; NOTE: An update to LLVM 10 is coming in 1.45, make sure not to miss it. + +;; TODO(staging): Bump this variable to the latest packaged rust. (define-public rust rust-1.39) -- 2.26.2 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 01 02:14:23 2020 Received: (at 40957) by debbugs.gnu.org; 1 Jul 2020 06:14:23 +0000 Received: from localhost ([127.0.0.1]:52189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqW0k-0005Oy-W3 for submit@debbugs.gnu.org; Wed, 01 Jul 2020 02:14:23 -0400 Received: from mail-oi1-f170.google.com ([209.85.167.170]:40834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqW0e-0005Oe-Sp for 40957@debbugs.gnu.org; Wed, 01 Jul 2020 02:14:21 -0400 Received: by mail-oi1-f170.google.com with SMTP id t198so7099734oie.7 for <40957@debbugs.gnu.org>; Tue, 30 Jun 2020 23:14:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=asu-edu.20150623.gappssmtp.com; s=20150623; h=content-transfer-encoding:from:mime-version:subject:message-id:date :to; bh=MB4JvqwHMK0jsgZ0of6pWNiUnkm8Dfptfg2W2dWObjk=; b=X92LMKusfGgzn/lweoCEMdff3sxjvomLh1f1DIg+f7sW7UcavLg5uOvDPouskDvGv9 5cGQl624V3EMqwWLk9qnzuoEr/TixjJtPsp1gzvnxzYWBTFVnMDLVzQCWCefodcyM6ft QeYkTibwPzZV8iHBm/zebqfy7xyKmvY9GcR2i6bnm4NSgpa4D/t51ROF5iwIDgt9TtLQ xJts3hyn/rgZgRr/FBc7HjimdKFtiitaGgyAu0xRUgC0TkcnKJRbibhAINcrWUB/3Cyy uX4EkmeOyceJIX7J0a87F+uv2runGYRcu4aNSMAz0YfRwRsrV9+YLwXN9Lc9MtZARsKz Zeyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:message-id:date:to; bh=MB4JvqwHMK0jsgZ0of6pWNiUnkm8Dfptfg2W2dWObjk=; b=Tqqu0CwJVHIuBbY6/Ir8WzRkXndMTH9k3njqztcOEh8M7Z/nK/BUMK91nUAxsNPqCX 0heaFGFpJV23CtGkIVClVmJ3d6nMOmrMAarKg4ZDRi1mCZxM/guhgq2Fi9lPNrT9sNLW /bmyVCjz6gj6ah11xpC2sykdC8DwiZ5jTgYFZfEB4LUKDW0ASsdUIsN3WUJ66Ytq/yPQ 1V6dhoLdPAwJ5bhA/UOVMmWNxX93sD0HfGKkM2vbuSip6cyxF3LYoXritNFcnjDpwrjJ ywePfNlOyaMZ42NTFZ+SW6BvdgJq5NMrpNf23OVE5lgG/IeUaWGw6U78BE/BpbF1DN4V faQA== X-Gm-Message-State: AOAM532XnYx14ZQwczVovYzEODBuk/Ex+pkIc+DgG7tvhyxqHOVINWTG AEcBtfzhDxzEcxpU7k5a8Zk22cIlyxM= X-Google-Smtp-Source: ABdhPJytG4Xgf5wa4bxNWnxfoPXTDz5jhOsm5k0vl8RYxhjqIfmzpxIem+whjhIcTT94yeT6Fpiucg== X-Received: by 2002:aca:62c6:: with SMTP id w189mr17815752oib.169.1593584050639; Tue, 30 Jun 2020 23:14:10 -0700 (PDT) Received: from ?IPv6:2600:1700:83b0:8bd0:cde2:ca4a:e3d5:fc50? ([2600:1700:83b0:8bd0:cde2:ca4a:e3d5:fc50]) by smtp.gmail.com with ESMTPSA id d26sm1281031otl.49.2020.06.30.23.14.09 for <40957@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Jun 2020 23:14:10 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: John Soo Mime-Version: 1.0 (1.0) Subject: [PATCH 1/?] gnu: rust: Add 1.40 Message-Id: Date: Tue, 30 Jun 2020 23:14:09 -0700 To: 40957@debbugs.gnu.org X-Mailer: iPhone Mail (17F80) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 40957 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello Jakub and Guix, =EF=BB=BFI can provide some feedback n this patch set. I have been using ru= stc and cargo at 1.44 without issue for two weeks using these patches. I als= o set 1.44 as the default rust without breakages on x86.=20 Hope that helps and thanks for the patches! - John From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 02 19:41:37 2020 Received: (at 40957-done) by debbugs.gnu.org; 2 Jul 2020 23:41:37 +0000 Received: from localhost ([127.0.0.1]:55914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr8pl-0007an-4M for submit@debbugs.gnu.org; Thu, 02 Jul 2020 19:41:37 -0400 Received: from pat.zlotemysli.pl ([37.59.186.212]:36246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr8pj-0007ae-1x for 40957-done@debbugs.gnu.org; Thu, 02 Jul 2020 19:41:35 -0400 Received: (qmail 32329 invoked by uid 1009); 3 Jul 2020 01:41:34 +0200 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25860. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.04686 secs); 02 Jul 2020 23:41:34 -0000 Received: from unknown (HELO gravity) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with SMTP; 3 Jul 2020 01:41:34 +0200 Date: Fri, 3 Jul 2020 01:41:32 +0200 From: Jakub =?utf-8?B?S8SFZHppb8WCa2E=?= To: John Soo Subject: Re: [PATCH 1/?] gnu: rust: Add 1.40 Message-ID: <20200702234132.uyeaudazjqftm4o2@gravity> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2xwz4gur3gek52yo" Content-Disposition: inline In-Reply-To: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40957-done Cc: 40957-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --2xwz4gur3gek52yo Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 30, 2020 at 11:14:09PM -0700, John Soo wrote: > Hello Jakub and Guix, >=20 > =EF=BB=BFI can provide some feedback n this patch set. I have been using= rustc and cargo at 1.44 without issue for two weeks using these patches. I= also set 1.44 as the default rust without breakages on x86.=20 >=20 > Hope that helps and thanks for the patches! >=20 > - John Thanks for your feedback! I have pushed the patches, with the difference that rust-1.44 is 1.44.1 instead. Regards, Jakub K=C4=85dzio=C5=82ka --2xwz4gur3gek52yo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE5Xa/ss9usT31cTO54xWnWEYTFWQFAl7+cKwACgkQ4xWnWEYT FWRiEhAA22hCewmpJZkTkrWnnYVrbVoOaT9NotZi5tyWcqZjuRWjm2sk0rrNdGFK shGaEj+OMFrVPMJ23yX7HHygcjf+U5F3mpIInu3/SsHZIpJrxivT++icDyJib4/k zjS4EH5tH24gABO9iliEft9mob7DakUaHCcS3e//0T3eoHo4SodpUPNYbVSNhamQ clTRIjftjKQxOzokaFist2EXPYcTgkAuAvk1sIap5w2IagXM5AuNDS7EJJ2aVNGA 8KNg287MVbGXpb4IQLv3hQPjSskujBy3SN5x0aA0X9XYCWjATecwJAS67xhM7+dr CwU7BbTNPmYJuGuR2yUIGxSjlylpGy9aGFrWLm9DHEYzy2HS34YRM8uqqfUk5qrq bfGx4KZUqOxoIAr5w7+HqI6Bg/100aqEj2nF0rNeCeHDIqMBmsh1RxgYMsnbnJWc 6LbNPr47sIGn9dlOdYj1u+UPm6T/L968zmKZ0ipHK7us3wlgnUpmeMMp0YsRDlUJ BuPS6O+2PvGwdSn+k+FcbEp26tDsEEaH9l0OvG+NAme6QPoKw4+Ue7TdeeLlQBvS DVcThhaer/SNDw2ENytjY9vR66IW2ftG469/NPgQsXgqwo4JkZi5Q3icsaTIpCA3 c+GyphC3Zf5vp3cjV8E4PLUN+I2wB22eKoeNhZD14KgF2JPajEw= =r8Ip -----END PGP SIGNATURE----- --2xwz4gur3gek52yo-- From unknown Sat Jun 21 03:24:33 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 31 Jul 2020 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator