From owner-svn-src-projects@freebsd.org Mon Sep 23 17:05:47 2019 Return-Path: Delivered-To: svn-src-projects@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 94F36FA492 for ; Mon, 23 Sep 2019 17:05:47 +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.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.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46cW173Rqtz4G8P; Mon, 23 Sep 2019 17:05:47 +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 3CC2E19FC8; Mon, 23 Sep 2019 17:05:47 +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 x8NH5lEb044339; Mon, 23 Sep 2019 17:05:47 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8NH5kCw044337; Mon, 23 Sep 2019 17:05:46 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201909231705.x8NH5kCw044337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 23 Sep 2019 17:05:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r352629 - projects/clang900-import/contrib/llvm/lib/Target/X86 X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: projects/clang900-import/contrib/llvm/lib/Target/X86 X-SVN-Commit-Revision: 352629 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.29 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: Mon, 23 Sep 2019 17:05:47 -0000 Author: dim Date: Mon Sep 23 17:05:46 2019 New Revision: 352629 URL: https://svnweb.freebsd.org/changeset/base/352629 Log: Pull in r372606 from upstream llvm trunk (by Sanjay Patel): [x86] fix assert with horizontal math + broadcast of vector (PR43402) https://bugs.llvm.org/show_bug.cgi?id=43402 This should fix 'Assertion failed: ((HOp.getValueType() == MVT::v2f64 || HOp.getValueType() == MVT::v4f64) && HOp.getValueType() == VT && "Unexpected type for h-op"), function foldShuffleOfHorizOp, file contrib/llvm/lib/Target/X86/X86ISelLowering.cpp, line 33661' when building the devel/llvm90 port with CPUTYPE=haswell. PR: 240759 Modified: projects/clang900-import/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp projects/clang900-import/contrib/llvm/lib/Target/X86/X86ISelLowering.h Modified: projects/clang900-import/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp ============================================================================== --- projects/clang900-import/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Mon Sep 23 15:58:54 2019 (r352628) +++ projects/clang900-import/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Mon Sep 23 17:05:46 2019 (r352629) @@ -33651,14 +33651,14 @@ static SDValue foldShuffleOfHorizOp(SDNode *N, Selecti // When the operands of a horizontal math op are identical, the low half of // the result is the same as the high half. If a target shuffle is also - // replicating low and high halves, we don't need the shuffle. + // replicating low and high halves (and without changing the type/length of + // the vector), we don't need the shuffle. if (Opcode == X86ISD::MOVDDUP || Opcode == X86ISD::VBROADCAST) { - if (HOp.getScalarValueSizeInBits() == 64) { + if (HOp.getScalarValueSizeInBits() == 64 && HOp.getValueType() == VT) { // movddup (hadd X, X) --> hadd X, X // broadcast (extract_vec_elt (hadd X, X), 0) --> hadd X, X assert((HOp.getValueType() == MVT::v2f64 || - HOp.getValueType() == MVT::v4f64) && HOp.getValueType() == VT && - "Unexpected type for h-op"); + HOp.getValueType() == MVT::v4f64) && "Unexpected type for h-op"); return updateHOp(HOp, DAG); } return SDValue(); Modified: projects/clang900-import/contrib/llvm/lib/Target/X86/X86ISelLowering.h ============================================================================== --- projects/clang900-import/contrib/llvm/lib/Target/X86/X86ISelLowering.h Mon Sep 23 15:58:54 2019 (r352628) +++ projects/clang900-import/contrib/llvm/lib/Target/X86/X86ISelLowering.h Mon Sep 23 17:05:46 2019 (r352629) @@ -422,7 +422,8 @@ namespace llvm { // Tests Types Of a FP Values for scalar types. VFPCLASSS, - // Broadcast scalar to vector. + // Broadcast (splat) scalar or element 0 of a vector. If the operand is + // a vector, this node may change the vector length as part of the splat. VBROADCAST, // Broadcast mask to vector. VBROADCASTM,