From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 72D73382EF0A; Thu, 24 Nov 2022 19:30:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 72D73382EF0A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669318216; bh=NcIIwerMKAlbjfs7uQ/gYKw892ZgeFDmTkPfNsgfp94=; h=From:To:Subject:Date:In-Reply-To:References:From; b=XZSITX1QFxXanTEj+DAiEsFEhBPnN8zRk227PDVABRlmmXN/wZ/jp2Xnt/kgG+3aR oA36lF1fV8eyk9v1Az7Pz+lSJsA9Ph8de6UP/GATxmXWzYYrU/Mdb4G38Vg9RvqTtL Ko0QEkB5DWppStSOG40KkXkFZ6Lj40uw8+Td/dhk= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/107863] [10/11/12/13 Regression] ICE with unrecognizable insn when using -funsigned-char with some SSE/AVX builtins Date: Thu, 24 Nov 2022 19:30:16 +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: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: 10.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: target_milestone short_desc cf_known_to_work keywords cf_known_to_fail 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107863 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |10.5 Summary|ICE with unrecognizable |[10/11/12/13 Regression] |insn when using |ICE with unrecognizable |-funsigned-char with some |insn when using |AVX builtins |-funsigned-char with some | |SSE/AVX builtins Known to work| |4.4.7 Keywords| |ice-on-valid-code Known to fail| |4.5.3 Last reconfirmed| |2022-11-24 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski --- Reduced to just: #include __m128i f(__m128i a) { return _mm_insert_epi8(a, -1, 2); } This only requires -msse4.1 -funsigned-char to reproduce the ICE. ;; _4 =3D __builtin_ia32_vec_set_v16qi (_1, 255, 2); (insn 7 6 8 (set (reg:QI 86) (const_int 255 [0xff])) "/app/example.cpp":4:11 -1 (nil)) Without -funsigned-char: ;; _4 =3D __builtin_ia32_vec_set_v16qi (_1, -1, 2); (insn 7 6 8 (set (reg:QI 86) (const_int -1 [0xffffffffffffffff])) "/app/example.cpp":4:11 -1 (nil)) I suspect the issue is the definition of __builtin_ia32_vec_set_v16qi uses = char type rather than signed/unsigned char here ...=