From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ED3EA3858408; Mon, 20 Feb 2023 11:14:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ED3EA3858408 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676891668; bh=Smn1VwLFFNE9alDs2v8crf0DkrKaxGYJ3MG9++NtX5Y=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wGpWpMGBZn9AbdnUaFvCz+i2uK/tDd0r/9W5jPS323AFL430h91HXZm3Rbwyqeoex yLoOn9TsXbWGBut+fRy5AerTKCRb05DajUYrNMlbSJCLgdGv7vCZu5dOGLsyh8lGWq eLPOmzt2e76vRV/1xB9gSAAqSEuAH5LH8rOWWHxc= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108804] missed vectorization in presence of conversion from uint64_t to float Date: Mon, 20 Feb 2023 11:14:28 +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.2.1 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW 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: cf_gcctarget bug_status everconfirmed keywords cf_reconfirmed_on 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=3D108804 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Target| |x86_64-*-* Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Keywords| |missed-optimization Last reconfirmed| |2023-02-20 --- Comment #2 from Richard Biener --- EVRP does @@ -38,16 +61,18 @@ k_12 =3D k_10 >> 23; _2 =3D k_12 & 8388607; y_13 =3D _2 | 1065353216; - _3 =3D (float) x_11; + _17 =3D (signed long) x_11; + _3 =3D (float) _17; f[i_6] =3D _3; _4 =3D i_6 + 128; - _5 =3D (float) y_13; + _18 =3D (signed long) y_13; + _5 =3D (float) _18; f[_4] =3D _5; because unsigned long -> float is even more difficult. With -fno-tree-vrp the conversion is still from uint64_t but that's not supported either. So it's a target issue. Shorter testcase: #include uint64_t d[512]; float f[1024]; void foo() { for (int i=3D0; i<512; ++i) { uint64_t k =3D d[i]; f[i]=3Dk; } }=