public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/107863] New: ICE with unrecognizable insn when using -funsigned-char with some AVX builtins
@ 2022-11-24 19:06 bouanto at zoho dot com
  2022-11-24 19:30 ` [Bug target/107863] [10/11/12/13 Regression] ICE with unrecognizable insn when using -funsigned-char with some SSE/AVX builtins pinskia at gcc dot gnu.org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: bouanto at zoho dot com @ 2022-11-24 19:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107863

            Bug ID: 107863
           Summary: ICE with unrecognizable insn when using
                    -funsigned-char with some AVX builtins
           Product: gcc
           Version: 12.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bouanto at zoho dot com
  Target Milestone: ---

Hi.
When I compile the following code:

#include <immintrin.h>

int main(int argc, char* argv[]) {
    __m256i a = _mm256_set1_epi8(4);
    __m256i b = _mm256_set1_epi8(2);
    __m256i mask = _mm256_insert_epi8(_mm256_set1_epi8(0), -1, 2);
    __m256i r = (__m256i) __builtin_ia32_pblendvb256 ((__v32qi)a, (__v32qi)b,
(__v32qi)mask);
    return 0;
}

with the following command:

gcc main.c -o main -mavx512f -funsigned-char

I get the following error:

main.c: In function ‘main’:
main.c:9:1: error: unrecognizable insn:
    9 | }
      | ^
(insn 655 654 656 2 (set (reg:QI 607)
        (const_int 255 [0xff])) "main.c":6:20 -1
     (nil))
during RTL pass: vregs
main.c:9:1: internal compiler error: in extract_insn, at recog.cc:2791
0x1840d78 internal_error(char const*, ...)
        ???:0
0x62a3ac fancy_abort(char const*, int, char const*)
        ???:0
0x60555b _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        ???:0
0x60557d _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        ???:0

The code compiles when not using -funsigned-char.

I'm not sure what would be the fix for this. Would it make sense that builtins
never use the char type, but instead use either unsigned char or signed char?

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-12-01 15:45 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-24 19:06 [Bug target/107863] New: ICE with unrecognizable insn when using -funsigned-char with some AVX builtins bouanto at zoho dot com
2022-11-24 19:30 ` [Bug target/107863] [10/11/12/13 Regression] ICE with unrecognizable insn when using -funsigned-char with some SSE/AVX builtins pinskia at gcc dot gnu.org
2022-11-24 19:35 ` pinskia at gcc dot gnu.org
2022-11-24 20:12 ` rguenth at gcc dot gnu.org
2022-11-25  2:26 ` crazylht at gmail dot com
2022-11-25  2:52 ` crazylht at gmail dot com
2022-11-25  5:16 ` crazylht at gmail dot com
2022-11-25  5:32 ` crazylht at gmail dot com
2022-11-25  6:06 ` crazylht at gmail dot com
2022-11-28  7:36 ` crazylht at gmail dot com
2022-11-29  6:17 ` crazylht at gmail dot com
2022-12-01  3:31 ` cvs-commit at gcc dot gnu.org
2022-12-01  3:33 ` cvs-commit at gcc dot gnu.org
2022-12-01  3:35 ` cvs-commit at gcc dot gnu.org
2022-12-01  3:37 ` cvs-commit at gcc dot gnu.org
2022-12-01  3:38 ` crazylht at gmail dot com
2022-12-01 15:45 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).