From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F2C11386F44E; Thu, 16 Apr 2020 21:18:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F2C11386F44E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587071885; bh=SaHHvH49TDV9k7de0d9GDyzcRQfvOdYx9r5L0UrddLY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Gqn3Aripibg9WMFnMYn15vfWAP1gt1ZYv2YQWJCHquwKBQMDCsvvydvm/Z7vcFtMd XAxy2zbpzLeWOUAGc6g493pqfL5w35hZxapNtzLxD/jh5BHfpJH3SoA49hYUJY8RTD vKrJGZWQCAZfL2cUQi+i+gmCXhO7tGBsJyuNXjiM= From: "segher at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/94613] S/390: Wrong code generated for vec_sel builtin Date: Thu, 16 Apr 2020 21:18:05 +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: 10.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: segher at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: krebbel at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_gcctarget cf_reconfirmed_on bug_status everconfirmed 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, 16 Apr 2020 21:18:06 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94613 Segher Boessenkool changed: What |Removed |Added ---------------------------------------------------------------------------- Target|s390x |s390x powerpc*-*-* Last reconfirmed| |2020-04-16 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #7 from Segher Boessenkool --- Yes. The rs6000 code is bad as well: (define_insn "*altivec_vsel" [(set (match_operand:VM 0 "altivec_register_operand" "=3Dv") (if_then_else:VM (ne:CC (match_operand:VM 1 "altivec_register_operand" "v") (match_operand:VM 4 "zero_constant" "")) (match_operand:VM 2 "altivec_register_operand" "v") (match_operand:VM 3 "altivec_register_operand" "v")))] "VECTOR_MEM_ALTIVEC_P (mode)" "vsel %0,%3,%2,%1" [(set_attr "type" "vecmove")]) That is not what the insn does (the compare should be *bitwise*: it does op0 :=3D (op2 & ~op1) | (op3 & op1) This can be written a few different ways in RTL; we'll have to find out what works best.=