From owner-freebsd-toolchain@freebsd.org Sun Feb 24 21:22:36 2019 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E780A150D2A7 for ; Sun, 24 Feb 2019 21:22:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 66A7E8931B for ; Sun, 24 Feb 2019 21:22:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 2778C150D2A6; Sun, 24 Feb 2019 21:22:35 +0000 (UTC) Delivered-To: toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02CE5150D2A5 for ; Sun, 24 Feb 2019 21:22:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 411678930F for ; Sun, 24 Feb 2019 21:22:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 65F6C77DB for ; Sun, 24 Feb 2019 21:22:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x1OLMXXQ089442 for ; Sun, 24 Feb 2019 21:22:33 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x1OLMX7u089433 for toolchain@FreeBSD.org; Sun, 24 Feb 2019 21:22:33 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: toolchain@FreeBSD.org Subject: [Bug 233143] cc -mcmodel=large croaks on Date: Sun, 24 Feb 2019 21:22:33 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: toolchain@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Feb 2019 21:22:36 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D233143 --- Comment #2 from commit-hook@freebsd.org --- A commit references this bug: Author: dim Date: Sun Feb 24 21:22:17 UTC 2019 New revision: 344503 URL: https://svnweb.freebsd.org/changeset/base/344503 Log: Pull in r354756 from upstream llvm trunk (by Craig Topper): [X86] Fix tls variable lowering issue with large code model Summary: The problem here is the lowering for tls variable. Below is the DAG for the code. SelectionDAG has 11 nodes: t0: ch =3D EntryToken t8: i64,ch =3D load<(load 8 from `i8 addrspace(257)* null`, addrspace 257)> t0, Constant:i64<0>, undef:i64 t10: i64 =3D X86ISD::WrapperRIP TargetGlobalTLSAddress:i64 0 [TF=3D10] t11: i64,ch =3D load<(load 8 from got)> t0, t10, undef:i64 t12: i64 =3D add t8, t11 t4: i32,ch =3D load<(dereferenceable load 4 from @x)> t0, t12, undef:i64 t6: ch =3D CopyToReg t0, Register:i32 %0, t4 And when mcmodel is large, below instruction can NOT be folded. t10: i64 =3D X86ISD::WrapperRIP TargetGlobalTLSAddress:i64 0 [TF=3D10] t11: i64,ch =3D load<(load 8 from got)> t0, t10, undef:i64 So "t11: i64,ch =3D load<(load 8 from got)> t0, t10, undef:i64" is lowered to " Morphed node: t11: i64,ch =3D MOV64rm t10, TargetConstant:i8<1>, Register:i64 $noreg, TargetConstant:i32<0>, Register:i32 $noreg, t0" When llvm start to lower "t10: i64 =3D X86ISD::WrapperRIP TargetGlobalTLSAddress:i64 0 [TF=3D10]", it fails. The patch is to fold the load and X86ISD::WrapperRIP. Fixes PR26906 Patch by LuoYuanke Reviewers: craig.topper, rnk, annita.zhang, wxiao3 Reviewed By: rnk Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58336 This should fix "fatal error: error in backend: Cannot select" messages when compiling functions using -mcmodel=3Dlarge. Reported by: phk PR: 233143 MFC after: 3 days Changes: head/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp --=20 You are receiving this mail because: You are the assignee for the bug.=