From owner-svn-src-projects@freebsd.org Tue Jan 9 17:41:36 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FE6EE66089 for ; Tue, 9 Jan 2018 17:41:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F004D63AF3; Tue, 9 Jan 2018 17:41:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3C6FF1A082; Tue, 9 Jan 2018 17:41:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w09HfZCe013562; Tue, 9 Jan 2018 17:41:35 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w09HfZid013561; Tue, 9 Jan 2018 17:41:35 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801091741.w09HfZid013561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 9 Jan 2018 17:41:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r327734 - projects/clang600-import/contrib/llvm/lib/CodeGen X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: projects/clang600-import/contrib/llvm/lib/CodeGen X-SVN-Commit-Revision: 327734 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jan 2018 17:41:36 -0000 Author: dim Date: Tue Jan 9 17:41:34 2018 New Revision: 327734 URL: https://svnweb.freebsd.org/changeset/base/327734 Log: Pull in r322056 from upstream llvm trunk (by Serguei Katkov): [CGP] Fix Complex addressing mode for offset If the offset is differ in two addressing mode we can continue only if ScaleReg is not set due to we will use it as merge of different offsets. It should fix PR35799 and PR35805. Reviewers: john.brawn, reames Reviewed By: reames Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41227 This should fix "ScaledReg == nullptr" assertions when building the graphics/xpx, mail/alpine and editors/pico-alpine ports. Reported by: jbeich PR: 224866, 224995 Modified: projects/clang600-import/contrib/llvm/lib/CodeGen/CodeGenPrepare.cpp Modified: projects/clang600-import/contrib/llvm/lib/CodeGen/CodeGenPrepare.cpp ============================================================================== --- projects/clang600-import/contrib/llvm/lib/CodeGen/CodeGenPrepare.cpp Tue Jan 9 17:38:43 2018 (r327733) +++ projects/clang600-import/contrib/llvm/lib/CodeGen/CodeGenPrepare.cpp Tue Jan 9 17:41:34 2018 (r327734) @@ -2700,8 +2700,13 @@ class AddressingModeCombiner { (public) // we still need to collect it due to original value is different. // And later we will need all original values as anchors during // finding the common Phi node. + // We also must reject the case when base offset is different and + // scale reg is not null, we cannot handle this case due to merge of + // different offsets will be used as ScaleReg. if (DifferentField != ExtAddrMode::MultipleFields && - DifferentField != ExtAddrMode::ScaleField) { + DifferentField != ExtAddrMode::ScaleField && + (DifferentField != ExtAddrMode::BaseOffsField || + !NewAddrMode.ScaledReg)) { AddrModes.emplace_back(NewAddrMode); return true; }