From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 701B4388F400; Tue, 5 May 2020 21:41:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 701B4388F400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1588714892; bh=qDeflSKlKj00zmJzXyQI4GGXJ2xvZaPurxson5CoJ20=; h=From:To:Subject:Date:From; b=Ajn8D6jkZAUGxx//ZWXcYrYYdLO5wLngtimYEKwvxpOl/mELoR0NraXPnHKbNdvm0 hxcA7mLM4NyHeL79q9IjiHqaTqB0XE73kceEMjtUZuxhJunLd26egxVb/a+yBdwI9h czDGc/+PzBuBRJOUMtigVS+v4Rfbb5+CsI82fpRY= From: "nemo@self-evident.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/94962] New: Suboptimal AVX2 code for _mm256_zextsi128_si256(_mm_set1_epi8(-1)) Date: Tue, 05 May 2020 21:41:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: nemo@self-evident.org 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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: Tue, 05 May 2020 21:41:32 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94962 Bug ID: 94962 Summary: Suboptimal AVX2 code for _mm256_zextsi128_si256(_mm_set1_epi8(-1)) Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: nemo@self-evident.org Target Milestone: --- Background: https://stackoverflow.com/q/61601902/ GCC emits an unnecessary "vmovdqa xmm0,xmm0" for the following code: __m256i mask() { return _mm256_zextsi128_si256(_mm_set1_epi8(-1)); } Live example on godbolt: https://gcc.godbolt.org/z/PbsQDR I have found no way to avoid this except by resorting to inline asm.=