From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54171 invoked by alias); 28 Oct 2019 22:02:36 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 54161 invoked by uid 89); 28 Oct 2019 22:02:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT autolearn=ham version=3.3.1 spammy=dialect X-HELO: us-smtp-delivery-1.mimecast.com Received: from us-smtp-2.mimecast.com (HELO us-smtp-delivery-1.mimecast.com) (207.211.31.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 28 Oct 2019 22:02:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572300152; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NJugXQryliDS+/4yWRlVKg/9dYnTg+O2swBjnuOM3U8=; b=NEwlw19F0K7KwYKo0bYNa0iyiJxfQ0s+DGF7O51nfoXIcyowR5KnkhqNbZtg0F2lgZraGV 6K0IP2ZD9m81rLB1cNyEVEd0UM+JRieGo2ZzwVuXmnWIWaBDDknYvrp/6ggMCfxj4+Y7ZW gp0fhEx2gADH5+z2yBkoJHgEDVVS1CU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-291-JDExibaPNQi4T4P3vTubzA-1; Mon, 28 Oct 2019 18:02:29 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4537C107AD28; Mon, 28 Oct 2019 22:02:28 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.36.118.135]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D29F72634E; Mon, 28 Oct 2019 22:02:27 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id x9SM2PVt013536; Mon, 28 Oct 2019 23:02:25 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id x9SM2NeQ013535; Mon, 28 Oct 2019 23:02:23 +0100 Date: Mon, 28 Oct 2019 22:06:00 -0000 From: Jakub Jelinek To: Uros Bizjak , Hongtao Liu Cc: GCC Patches Subject: [PATCH] Unbreak -masm=intel (PR target/92258) Message-ID: <20191028220223.GC4650@tucnak> Reply-To: Jakub Jelinek References: MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-IsSubscribed: yes X-SW-Source: 2019-10/txt/msg01993.txt.bz2 Hi! On Sat, Oct 26, 2019 at 09:27:12PM +0800, Hongtao Liu wrote: > > BTW: Please also note that there is no need to use or operand > > mode override in scalar insn templates for intel asm dialect when > > operand already has a scalar mode. > https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01868.html >=20 > This patch is to remove redundant when operand already has a scala= r mode. >=20 > bootstrap and regression test for i386/x86-64 is ok. >=20 > Changelog > gcc/ > * config/i386/sse.md (*_vm3, > _vm3): Remove since > operand is already scalar mode. > (iptr): Remove SF/DF. SF/DFmode in iptr certainly is not redundant, if you look at tmp-mddump.md after this patch, there is kept in all the sse.md:3140 patterns: (define_insn "_comi" [(set (reg:CCFP FLAGS_REG) (compare:CCFP (vec_select:MODEF (match_operand: 0 "register_operand" "v") (parallel [(const_int 0)])) (vec_select:MODEF (match_operand: 1 "" "") (parallel [(const_int 0)]))))] "SSE_FLOAT_MODE_P (mode)" "%vcomi\t{%1, %0|%0, %1}" [(set_attr "type" "ssecomi") (set_attr "prefix" "maybe_vex") (set_attr "prefix_rep" "0") (set (attr "prefix_data16") (if_then_else (eq_attr "mode" "DF") (const_string "1") (const_string "0"))) (set_attr "mode" "")]) While operands[1] has V2DFmode or V4SFmode and thus not a scalar mode, we still want a q or k modifier on it, because that is what the instruction actually reads. The following patch reverts that part, ok for trunk if it passes bootstrap/regtest? 2019-10-28 Jakub Jelinek PR target/92258 * config/i386/sse.md (iptr): Revert 2019-10-27 change. * gcc.target/i386/pr92258.c: New test. --- gcc/config/i386/sse.md.jj 2019-10-28 22:16:14.619007560 +0100 +++ gcc/config/i386/sse.md 2019-10-28 22:51:48.594746180 +0100 @@ -850,7 +850,8 @@ (define_mode_attr iptr (V16QI "b") (V8HI "w") (V4SI "k") (V2DI "q") (V16SF "k") (V8DF "q") (V8SF "k") (V4DF "q") - (V4SF "k") (V2DF "q")]) + (V4SF "k") (V2DF "q") + (SF "k") (DF "q")]) =20 ;; Mapping of vector modes to VPTERNLOG suffix (define_mode_attr ternlogsuffix --- gcc/testsuite/gcc.target/i386/pr92258.c.jj 2019-10-28 22:52:44.09388117= 8 +0100 +++ gcc/testsuite/gcc.target/i386/pr92258.c 2019-10-28 22:52:40.150942632 += 0100 @@ -0,0 +1,11 @@ +/* PR target/92258 */ +/* { dg-do compile } */ +/* { dg-options "-masm=3Dintel" } */ + +typedef double V __attribute__ ((__vector_size__ (16))); + +int +foo (V x, V y) +{ + return __builtin_ia32_ucomisdeq (x, y); +} Jakub