From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E9137389002D; Thu, 24 Jun 2021 01:56:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E9137389002D From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/101185] pr96814.c failed after r12-1669 on non-avx512 platform Date: Thu, 24 Jun 2021 01:56:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: crazylht at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jun 2021 01:56:39 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101185 --- Comment #3 from Hongtao.liu --- (In reply to Hongtao.liu from comment #1) > Alloc order is just another kind of cost which can be compensated by > increasing cost of mask->integer and integer->mask. >=20 > With below patch , pr96814 wouldn't generate any mask intructions execept > for=20 >=20 > kmovd %eax, %k1 > vpcmpeqd %ymm1, %ymm1, %ymm1 > vmovdqu8 %ymm1, %ymm0{%k1}{z} >=20 > which is what we want. >=20 >=20 > modified gcc/config/i386/i386.md > @@ -1335,7 +1335,7 @@ > (define_insn "*cmp_ccz_1" > [(set (reg FLAGS_REG) > (compare (match_operand:SWI1248_AVX512BWDQ_64 0 > - "nonimmediate_operand" ",?m,$k") > + "nonimmediate_operand" ",?m,*k") > (match_operand:SWI1248_AVX512BWDQ_64 1 "const0_operand")))] > "TARGET_AVX512F && ix86_match_ccmode (insn, CCZmode)" > "@ > modified gcc/config/i386/x86-tune-costs.h > @@ -2768,7 +2768,7 @@ struct processor_costs intel_cost =3D { > {6, 6, 6, 6, 6}, /* cost of storing SSE registers > in 32,64,128,256 and 512-bit */ > 4, 4, /* SSE->integer and integer->SSE moves */ > - 4, 4, /* mask->integer and integer->mask moves */ > + 6, 6, /* mask->integer and integer->mask moves */ I changed intel_cost just to validate 1 unit more cost is also enough for -mtune=3Dintel to prevent generation of mask instructions.=