From nobody Fri Dec 24 18:54:22 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5FE611904512; Fri, 24 Dec 2021 18:54:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JLGSb0qtQz3J0H; Fri, 24 Dec 2021 18:54:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F102CEAA; Fri, 24 Dec 2021 18:54:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BOIsMOT044535; Fri, 24 Dec 2021 18:54:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BOIsM2C044534; Fri, 24 Dec 2021 18:54:22 GMT (envelope-from git) Date: Fri, 24 Dec 2021 18:54:22 GMT Message-Id: <202112241854.1BOIsM2C044534@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 938400756469 - stable/12 - Apply clang fix for crash or assertion failure compiling part of llvm List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 9384007564692027d0e04009cde45c492dacae93 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640372063; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kf4fAyABc60GQO0qDiiWl0akfHoKRr1czE3UqUuVjb4=; b=OXq3wCXnuu4XgKIdgZI+rCViMLSy48b5lp91gePARxJUyd2KJKCrgToR80DnVnoGGn47J6 T1OdPuWO075OaA8VO1uqtIEq39ptwc8jKOnQ3uzKdckcnghZiEHaT+U7kLrJl+9+YDjpw8 hIH1n7K5KPPCCmvB6QJa8uRJSIHCf1fXQZV3ETQzAtzG891ReVuWT9FytEpviIFNRzq97H UNCDpge795td8bRQdA4kMR8ojBWqmXlnW7tRidtTZv/Q+Lede3iGPMY0Lt8ttA7WD3aJBO gwgeplMrkQshgKyBRthQFxuG7UrLZeI5JBdgByZ722vdryd7+m5vWI3oWGCg7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640372063; a=rsa-sha256; cv=none; b=Jy1PC7F2+MVHxnXUY4vbGGMb4bph5tb3cTFJ9S9+LsXEDXN+DG2Tdb3on/9lQcnD9Rci3I uzijm50Ek+ZWOhxmfqLbeVo+HDieXTCzYOkbTpKe3KCoAJdwNG7Ts6pNLpNCe5/IzmKDMR sO+bbQPwAG/zwmsLcSnbq9rUIonwk2V+OGfiGrGeJF54iin7Pw151s4BGgfO7FLjoqVUM/ uKrpLALVR+koZ4aeTopgVLOHZIxddePBHrl6X21qPLgbT91vn9GK/0hoF2KsCON/tzhhTn c6thT3XclBe3+xGIZ4iklYGXEgb70YMkShG9DgNT+iFdTT0ULwKLKGV1Od2CCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=9384007564692027d0e04009cde45c492dacae93 commit 9384007564692027d0e04009cde45c492dacae93 Author: Dimitry Andric AuthorDate: 2021-12-24 11:46:00 +0000 Commit: Dimitry Andric CommitDate: 2021-12-24 13:02:46 +0000 Apply clang fix for crash or assertion failure compiling part of llvm Merge commit 77e8f4eeeeed from llvm git (by David Green): [ARM] Define ComplexPatternFuncMutatesDAG Some of the Arm complex pattern functions call canExtractShiftFromMul, which can modify the DAG in-place. For this to be valid and handled successfully we need to define ComplexPatternFuncMutatesDAG. Differential Revision: https://reviews.llvm.org/D107476 When building parts of llvm targeting armv6 on stable/12, the following assertion can appear (or if assertions are disabled, clang is likely to crash): Assertion failed: (NodeToMatch->getOpcode() != ISD::DELETED_NODE && "NodeToMatch was removed partway through selection"), function SelectCodeCommon, file /usr/src/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp, line 3573. PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script. Stack dump: 0. Program arguments: /usr/obj/usr/src/freebsd12-amd64/tmp/usr/bin/c++ -cc1 -triple armv6kz-unknown-freebsd12.3-gnueabihf -S --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -mrelocation-model static -mconstructor-aliases -target-cpu arm1176jzf-s -target-feature +vfp2 -target-feature +vfp2sp -target-feature -vfp3 -target-feature -vfp3d16 -target-feature -vfp3d16sp -target-feature -vfp3sp -target-feature -fp16 -target-feature -vfp4 -target-feature -vfp4d16 -target-feature -vfp4d16sp -target-feature -vfp4sp -target-feature -fp-armv8 -target-feature -fp-armv8d16 -target-feature -fp-armv8d16sp -target-feature -fp-armv8sp -target-feature -fullfp16 -target-feature +fp64 -target-feature -d32 -target-feature -neon -target-feature -sha2 -target-feature -aes -target-feature -fp16fml -target-feature +strict-align -target-abi aapcs-linux -mfloat-abi hard -fallow-half-arguments-and-returns -ffunction-sections -fdata-sections -O1 -std=c++14 -fdeprecated-macro -fno-rtti -fno-signed-char -faddrsig -fexperimental-new-pass-manager PPCISelLowering-009095.ii 1. parser at end of file 2. Code generation 3. Running pass 'Function Pass Manager' on module 'PPCISelLowering-009095.cpp'. 4. Running pass 'ARM Instruction Selection' on function '@_ZN4llvm17PPCTargetLoweringC2ERKNS_16PPCTargetMachineERKNS_12PPCSubtargetE' This crash or assertion is fixed by the upstream commit. MFC after: 3 days (cherry picked from commit ada8b24d48d93f0b13209b555b64f3d355ef61d9) --- contrib/llvm-project/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/llvm-project/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp b/contrib/llvm-project/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp index 2a9a31dab74f..41f4288462d1 100644 --- a/contrib/llvm-project/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp +++ b/contrib/llvm-project/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp @@ -78,6 +78,10 @@ public: void Select(SDNode *N) override; + /// Return true as some complex patterns, like those that call + /// canExtractShiftFromMul can modify the DAG inplace. + bool ComplexPatternFuncMutatesDAG() const override { return true; } + bool hasNoVMLxHazardUse(SDNode *N) const; bool isShifterOpProfitable(const SDValue &Shift, ARM_AM::ShiftOpc ShOpcVal, unsigned ShAmt);