From owner-svn-src-all@freebsd.org Thu Jun 2 19:54:39 2016 Return-Path: Delivered-To: svn-src-all@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 BC72CB662BA; Thu, 2 Jun 2016 19:54:39 +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 mx1.freebsd.org (Postfix) with ESMTPS id 746FA112C; Thu, 2 Jun 2016 19:54:39 +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 u52Jsc3x038258; Thu, 2 Jun 2016 19:54:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u52Jscl9038256; Thu, 2 Jun 2016 19:54:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201606021954.u52Jscl9038256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 2 Jun 2016 19:54:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301227 - in head: contrib/llvm/lib/Target/X86 lib/clang/include/clang/Basic X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jun 2016 19:54:39 -0000 Author: dim Date: Thu Jun 2 19:54:38 2016 New Revision: 301227 URL: https://svnweb.freebsd.org/changeset/base/301227 Log: Pull in r271548 from upstream llvm trunk (by me): Only attempt to detect AVG if SSE2 is available Summary: In PR29973 Sanjay Patel reported an assertion failure when a certain loop was optimized, for a target without SSE2 support. It turned out this was because of the AVG pattern detection introduced in rL253952. Prevent the assertion failure by bailing out early in `detectAVGPattern()`, if the target does not support SSE2. Also add a minimized test case. Reviewers: congh, eli.friedman, spatel Subscribers: emaste, llvm-commits Differential Revision: http://reviews.llvm.org/D20905 This should fix assertion failures ("Requires at least SSE2!") when building the games/0ad port with CPUTYPE=pentium3. Reported by: madpilot Modified: head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp head/lib/clang/include/clang/Basic/Version.inc Modified: head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp ============================================================================== --- head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Thu Jun 2 19:06:04 2016 (r301226) +++ head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Thu Jun 2 19:54:38 2016 (r301227) @@ -26159,6 +26159,8 @@ static SDValue detectAVGPattern(SDValue if (InScalarVT.getSizeInBits() <= ScalarVT.getSizeInBits()) return SDValue(); + if (!Subtarget->hasSSE2()) + return SDValue(); if (Subtarget->hasAVX512()) { if (VT.getSizeInBits() > 512) return SDValue(); Modified: head/lib/clang/include/clang/Basic/Version.inc ============================================================================== --- head/lib/clang/include/clang/Basic/Version.inc Thu Jun 2 19:06:04 2016 (r301226) +++ head/lib/clang/include/clang/Basic/Version.inc Thu Jun 2 19:54:38 2016 (r301227) @@ -9,4 +9,4 @@ #define SVN_REVISION "262564" -#define FREEBSD_CC_VERSION 1100003U +#define FREEBSD_CC_VERSION 1100004U