public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/98177] New: [11 Regression] SVE: ICE in expand_direct_optab_fn, at internal-fn.c:3368
@ 2020-12-07 15:21 acoplan at gcc dot gnu.org
  2020-12-07 15:21 ` [Bug target/98177] " acoplan at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: acoplan at gcc dot gnu.org @ 2020-12-07 15:21 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98177
           Summary: [11 Regression] SVE: ICE in expand_direct_optab_fn, at
                    internal-fn.c:3368
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: acoplan at gcc dot gnu.org
  Target Milestone: ---

For the following C++ testcase:

int a, b;
short c;
void d(long e) {
  for (int f = 0; f < b; f += 1)
    for (short g = 0; g < c; g += 5)
      a = (short)e;
}

we ICE with -Ofast -march=armv8.2-a+sve -msve-vector-bits=128 since
r11-4912-g46c705e70e078f6a1920d92e49042125d5e18495.

To reproduce:

$ aarch64-elf-gcc -c -S -Ofast -march=armv8.2-a+sve -msve-vector-bits=128
test.cc
during RTL pass: expand
test.cc: In function 'void d(long int)':
test.cc:3:6: internal compiler error: in expand_direct_optab_fn, at
internal-fn.c:3368
    3 | void d(long e) {
      |      ^
0xd63e0f expand_direct_optab_fn
        /home/alecop01/toolchain/src/gcc/gcc/internal-fn.c:3368
0xd64978 expand_REDUC_MAX
        /home/alecop01/toolchain/src/gcc/gcc/internal-fn.def:209
0xd6631e expand_internal_call(internal_fn, gcall*)
        /home/alecop01/toolchain/src/gcc/gcc/internal-fn.c:4089
0xd66338 expand_internal_call(gcall*)
        /home/alecop01/toolchain/src/gcc/gcc/internal-fn.c:4097
0xae74ad expand_call_stmt
        /home/alecop01/toolchain/src/gcc/gcc/cfgexpand.c:2740
0xae74ad expand_gimple_stmt_1
        /home/alecop01/toolchain/src/gcc/gcc/cfgexpand.c:3835
0xae74ad expand_gimple_stmt
        /home/alecop01/toolchain/src/gcc/gcc/cfgexpand.c:3999
0xaf1827 expand_gimple_basic_block
        /home/alecop01/toolchain/src/gcc/gcc/cfgexpand.c:6043
0xaf2ede execute
        /home/alecop01/toolchain/src/gcc/gcc/cfgexpand.c:6727
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Curiously, I can only reproduce the ICE when the testcase is treated as C++. It
seems we fail to vectorize the testcase if we instead treat it as C.

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

end of thread, other threads:[~2021-01-04  9:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-07 15:21 [Bug target/98177] New: [11 Regression] SVE: ICE in expand_direct_optab_fn, at internal-fn.c:3368 acoplan at gcc dot gnu.org
2020-12-07 15:21 ` [Bug target/98177] " acoplan at gcc dot gnu.org
2020-12-07 17:22 ` ktkachov at gcc dot gnu.org
2020-12-08  7:10 ` rguenth at gcc dot gnu.org
2020-12-18 18:21 ` cvs-commit at gcc dot gnu.org
2021-01-04  9:53 ` wirkus 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).