From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id A2DBD3857C7C; Fri, 10 Jul 2020 07:41:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A2DBD3857C7C Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06A7X2ux125786; Fri, 10 Jul 2020 03:41:42 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 326bp0bcux-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Jul 2020 03:41:42 -0400 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06A7XNox127272; Fri, 10 Jul 2020 03:41:41 -0400 Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0b-001b2d01.pphosted.com with ESMTP id 326bp0bcu8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Jul 2020 03:41:41 -0400 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 06A7f2E4003568; Fri, 10 Jul 2020 07:41:40 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma05fra.de.ibm.com with ESMTP id 326bc906kt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Jul 2020 07:41:39 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06A7fbjf55836808 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Jul 2020 07:41:37 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F260F4C050; Fri, 10 Jul 2020 07:41:36 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D1BD74C044; Fri, 10 Jul 2020 07:41:34 +0000 (GMT) Received: from luoxhus-MacBook-Pro.local (unknown [9.200.53.92]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 10 Jul 2020 07:41:34 +0000 (GMT) Subject: Re: [PATCH] rs6000: Split movsf_from_si from high word before reload[PR89310] To: Segher Boessenkool Cc: gcc-patches@gcc.gnu.org, dje.gcc@gmail.com, wschmidt@linux.ibm.com, guojiufu@linux.ibm.com, linkw@gcc.gnu.org References: <20200706021757.1118129-1-luoxhu@linux.ibm.com> <20200707001803.GR3598@gate.crashing.org> <66c7b5d6-afa6-53d7-704d-44834ff00311@linux.ibm.com> <20200707213116.GU3598@gate.crashing.org> <66faac54-0620-5ee0-ff48-5609ad9e3fa7@linux.ibm.com> <20200708224334.GY3598@gate.crashing.org> <20200709192515.GO3598@gate.crashing.org> From: luoxhu Message-ID: Date: Fri, 10 Jul 2020 15:41:33 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200709192515.GO3598@gate.crashing.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-10_02:2020-07-10, 2020-07-10 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 adultscore=0 impostorscore=0 lowpriorityscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 suspectscore=0 spamscore=0 clxscore=1015 malwarescore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007100047 X-Spam-Status: No, score=-8.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 07:41:43 -0000 On 2020/7/10 03:25, Segher Boessenkool wrote: > >> + "TARGET_NO_SF_SUBREG" >> + "#" >> + "&& vsx_reg_sfsubreg_ok (operands[0], SFmode)" > > Put this in the insn condition? And since this is just a predicate, > you can just use it instead of gpc_reg_operand. > > (The split condition becomes "&& 1" then, not ""). > +(define_insn_and_split "movsf_from_si2" + [(set (match_operand:SF 0 "vsx_reg_sfsubreg_ok" "=wa") + (unspec:SF + [(subreg:SI + (ashiftrt:DI + (match_operand:DI 1 "input_operand" "r") + (const_int 32)) + 0)] + UNSPEC_SF_FROM_SI)) + (clobber (match_scratch:DI 2 "=r"))] + "TARGET_NO_SF_SUBREG" + "#" + "&& 1" + [(const_int 0)] This change is invalid as it will cause an ICE in PR42475.c, reason is: insn #29 will be combined to insn #40, though split1 is success, but it will cause ICE in sched1 as the op[0] is not SFmode. Without this, #29 won't be combined to #40 as the gpc_reg_operand (operands[0], E_SFmode) will cause the match fail for subreg:SF (reg:SI 155 [ _4 ]) 0). pr42475.c.268r.combine: Trying 29 -> 40: 29: {r120:SF=unspec[r133:DI>>0x20#0] 86;clobber scratch;} 40: r155:SI#0=r120:SF REG_DEAD r120:SF Successfully matched this instruction: (set (subreg:SF (reg:SI 155 [ _4 ]) 0) (unspec:SF [ (subreg:SI (ashiftrt:DI (reg:DI 133) (const_int 32 [0x20])) 0) ] UNSPEC_SF_FROM_SI)) allowing combination of insns 29 and 40 original costs 12 + 4 = 16 replacement cost 12 deferring deletion of insn with uid = 29. modifying insn i3 40: {r155:SI#0=unspec[r133:DI>>0x20#0] 86;clobber scratch;} REG_DEAD r133:DI deferring rescan insn with uid = 40. pr42475.c.273r.split1: 69: r172:DI=r133:DI&0xffffffff00000000 70: r155:SI#0=unspec[r172:DI] 62 71: r155:SI#0=unspec[r155:SI#0] 103 41: NOTE_INSN_DELETED 42: r157:DI=r155:SI#0<<0x20 pr42475.c.280r.sched1: pr42475.c: In function ‘bar’: pr42475.c:20:1: error: unrecognizable insn: 20 | } | ^ (insn 71 70 41 2 (set (subreg:SF (reg:SI 155 [ _4 ]) 0) (unspec:SF [ (subreg:SF (reg:SI 155 [ _4 ]) 0) ] UNSPEC_VSX_CVSPDPN)) -1 (nil)) during RTL pass: sched1 dump file: pr42475.c.280r.sched1 pr42475.c:20:1: internal compiler error: in extract_insn, at recog.c:2294 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. VS not using vsx_reg_sfsubreg_ok as condition: pr42475.c.268r.combine: Trying 29 -> 40: 29: {r120:SF=unspec[r133:DI>>0x20#0] 86;clobber scratch;} 40: r155:SI#0=r120:SF REG_DEAD r120:SF Failed to match this instruction: (set (subreg:SF (reg:SI 155 [ _4 ]) 0) (unspec:SF [ (subreg:SI (ashiftrt:DI (reg:DI 133) (const_int 32 [0x20])) 0) ] UNSPEC_SF_FROM_SI)) 273r.split1: 69: r172:DI=r133:DI&0xffffffff00000000 70: r120:SF=unspec[r172:DI] 62 71: r120:SF=unspec[r120:SF] 103 40: r155:SI#0=r120:SF REG_DEAD r120:SF