From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BFEFF3858D28; Thu, 25 Jan 2024 01:03:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BFEFF3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706144639; bh=Ay+zRyMADRvXall+ydInx4GssAOnSyy1goJAOLknodw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CJRKh1jow3l3Gtabn5NI95Umn0/rj82K8bJ56L0IurOtVSDRPbLn6kAel26xiunDC 6IajsdAphOoVvOr5N0BrqowGJFJZfAGFyr3JF5uw7e9A3pSHtiycMQMFtrGJWM6eyz d4yVDdZddQqtJ6oarCy4Uwq7HdJ5iHPpMm/h/1uo= From: "liuhongt at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113576] [14 regression] 502.gcc_r hangs r14-8223-g1c1853a70f9422169190e65e568dcccbce02d95c Date: Thu, 25 Jan 2024 01:03:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: liuhongt at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113576 --- Comment #6 from Hongtao Liu --- Another potential buggy place is=20 240 vexit_reduc_67 =3D mask_patt_43.28_62 & mask_patt_43.28_63; 241 if (vexit_reduc_67 =3D=3D { -1, -1, -1, -1 }) 242 goto ; [94.50%] 243 else is expanded to=20 319(insn 69 68 70 8 (set (reg:CCZ 17 flags) 320 (compare:CCZ (reg:QI 189 [ vexit_reduc_67 ]) 321 (const_int -1 [0xffffffffffffffff]))) "test.c":83:18 discri= m 1 9 {*cmpqi_1} But it should only test the lower 4 bits, the higher part is zeroed by avx5= 12 comparison instructions. 293(insn 65 64 66 8 (set (reg:QI 186 [ mask_patt_43.28_62 ]) 294 (unspec:QI [ 295 (reg:V4DI 124 [ vect__29.26 ]) 296 (reg:V4DI 185) 297 (const_int 0 [0]) 298 ] UNSPEC_PCMP)) "test.c":83:18 discrim 1 2811 {avx512vl_cmpv4di3} 299 (nil)) 300(insn 66 65 67 8 (set (reg:V4DI 187) 301 (const_vector:V4DI [ 302 (const_int 0 [0]) repeated x4 303 ])) "test.c":83:18 discrim 1 2021 {movv4di_internal} 304 (nil)) 305(insn 67 66 68 8 (set (reg:QI 188 [ mask_patt_43.28_63 ]) 306 (unspec:QI [ 307 (reg:V4DI 125 [ vect__29.27 ]) 308 (reg:V4DI 187) 309 (const_int 0 [0]) 310 ] UNSPEC_PCMP)) "test.c":83:18 discrim 1 2811 {avx512vl_cmpv4di3} 311 (nil)) 312(insn 68 67 69 8 (parallel [ 313 (set (reg:QI 189 [ vexit_reduc_67 ]) 314 (and:QI (reg:QI 186 [ mask_patt_43.28_62 ]) 315 (reg:QI 188 [ mask_patt_43.28_63 ]))) 316 (clobber (reg:CC 17 flags)) 317 ]) "test.c":83:18 discrim 1 618 {*andqi_1} 318 (nil))=