* Clang collapses on template with 64 parameters
@ 2019-08-06 8:58 Agner Fog
2019-08-12 9:22 ` Mark Geisert
0 siblings, 1 reply; 2+ messages in thread
From: Agner Fog @ 2019-08-06 8:58 UTC (permalink / raw)
To: cygwin
Here's another bug report.
Cygwin Clang fails when compiling a complicated program with big
templates. The same program compiles OK on Linux clang.
I have not made a minimal test case because smaller cases compile ok.
The test case is too big for attaching to a mailing list, so I have made
it available at:
https://www.agner.org/rapporter/cygwin_clang_template_bug.zip
Command line:
clang -m64 -std=c++17 -O2 -mfma -mavx512bw -mavx512dq -mavx512vl
testbench2.cpp
The compiler issues a long message:
fatal error: error in backend: Cannot select: 0x6019f23c0: ch =
store<ST64[%169](tbaa=<0x600f4af78>)(alias.scope=<0x601890348>,<0x6018c6ab8>)>
0x601a239c8,
     0x6019f2018, FrameIndex:i64<7>, undef:i64
 0x6019f2018: v64i8,ch = VPSHUFBZrm<Mem:LD64[ConstantPool]>
0x6019dadb8, 0x6019db438, TargetConstant:i8<1>, Register:i64 %noreg,
TargetConstant:i32<0>, Register:i32 %noreg, 0x601926528
   0x6019dadb8: v64i8 = bitcast 0x6019f1c08
     0x6019f1c08: v8i64 = VPBROADCASTQZr 0x6019db368
       0x6019db368: v2i64 = extract_subvector 0x6019f1c08, Constant:i64<0>
         0x6019f1c08: v8i64 = VPBROADCASTQZr 0x6019db368
           0x6019db368: v2i64 = extract_subvector 0x6019f1c08,
Constant:i64<0>
             0x6019f1c08: v8i64 = VPBROADCASTQZr 0x6019db368
               0x6019db368: v2i64 = extract_subvector 0x6019f1c08,
Constant:i64<0>
                 0x6019f1c08: v8i64 = VPBROADCASTQZr 0x6019db368
                 0x601a23758: i64 = Constant<0>
             0x601a23758: i64 = Constant<0>
         0x601a23758: i64 = Constant<0>
   0x6019db438: i64 = X86ISD::Wrapper TargetConstantPool:i64<<64 x i8>
<i8 0, i8 1, i8 2, i8 -128, i8 4, i8 5, i8 6, i8 -128, i8 -128, i8 -128,
i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128,
i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128,
i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128,
i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128,
i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128,
i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128,
i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128>> 0
     0x6019dbcc0: i64 = TargetConstantPool<<64 x i8> <i8 0, i8 1, i8
2, i8 -128, i8 4, i8 5, i8 6, i8 -128, i8 -128, i8 -128, i8 -128, i8
-128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8
-128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8
-128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8
-128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8
-128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8
-128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8
-128, i8 -128, i8 -128, i8 -128, i8 -128>> 0
   0x6019db848: i8 = TargetConstant<1>
   0x6019f1a68: i64 = Register %noreg
   0x6019f20e8: i32 = TargetConstant<0>
   0x601a23620: i32 = Register %noreg
 0x6019dae20: i64 = FrameIndex<7>
 0x6019f2288: i64 = undef
In function: main
clang-5.0: error: clang frontend command failed with exit code 70 (use
-v to see invocation)
clang version 5.0.1 (tags/RELEASE_501/final)
Target: x86_64-unknown-windows-cygnus
Thread model: posix
InstalledDir: /usr/bin
clang-5.0: note: diagnostic msg: PLEASE submit a bug report to and
include the crash backtrace, preprocessed source, and associated run script.
clang-5.0: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-5.0: note: diagnostic msg: /tmp/testbench2-31c6c0.cpp
clang-5.0: note: diagnostic msg: /tmp/testbench2-31c6c0.sh
clang-5.0: note: diagnostic msg:
********************
The diagnostic files are included in the zip as diagnostic*
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Clang collapses on template with 64 parameters
2019-08-06 8:58 Clang collapses on template with 64 parameters Agner Fog
@ 2019-08-12 9:22 ` Mark Geisert
0 siblings, 0 replies; 2+ messages in thread
From: Mark Geisert @ 2019-08-12 9:22 UTC (permalink / raw)
To: cygwin
Agner Fog wrote:
> Here's another bug report.
>
> Cygwin Clang fails when compiling a complicated program with big templates. The
> same program compiles OK on Linux clang.
>
> I have not made a minimal test case because smaller cases compile ok.
>
> The test case is too big for attaching to a mailing list, so I have made it
> available at:
>
> https://www.agner.org/rapporter/cygwin_clang_template_bug.zip
>
> Command line:
>
> clang -m64 -std=c++17 -O2 -mfma -mavx512bw -mavx512dq -mavx512vl testbench2.cpp
>
> The compiler issues a long message:
>
> fatal error: error in backend: Cannot select: 0x6019f23c0: ch =
> store<ST64[%169](tbaa=<0x600f4af78>)(alias.scope=<0x601890348>,<0x6018c6ab8>)>
> 0x601a239c8,
> Â Â Â Â Â 0x6019f2018, FrameIndex:i64<7>, undef:i64
> Â 0x6019f2018: v64i8,ch = VPSHUFBZrm<Mem:LD64[ConstantPool]> 0x6019dadb8,
> 0x6019db438, TargetConstant:i8<1>, Register:i64 %noreg, TargetConstant:i32<0>,
> Register:i32 %noreg, 0x601926528
> Â Â Â 0x6019dadb8: v64i8 = bitcast 0x6019f1c08
> Â Â Â Â Â 0x6019f1c08: v8i64 = VPBROADCASTQZr 0x6019db368
> Â Â Â Â Â Â Â 0x6019db368: v2i64 = extract_subvector 0x6019f1c08, Constant:i64<0>
> Â Â Â Â Â Â Â Â Â 0x6019f1c08: v8i64 = VPBROADCASTQZr 0x6019db368
> Â Â Â Â Â Â Â Â Â Â Â 0x6019db368: v2i64 = extract_subvector 0x6019f1c08, Constant:i64<0>
> Â Â Â Â Â Â Â Â Â Â Â Â Â 0x6019f1c08: v8i64 = VPBROADCASTQZr 0x6019db368
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 0x6019db368: v2i64 = extract_subvector 0x6019f1c08,
> Constant:i64<0>
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 0x6019f1c08: v8i64 = VPBROADCASTQZr 0x6019db368
>
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 0x601a23758: i64 = Constant<0>
> Â Â Â Â Â Â Â Â Â Â Â Â Â 0x601a23758: i64 = Constant<0>
> Â Â Â Â Â Â Â Â Â 0x601a23758: i64 = Constant<0>
> Â Â Â 0x6019db438: i64 = X86ISD::Wrapper TargetConstantPool:i64<<64 x i8> <i8 0,
> i8 1, i8 2, i8 -128, i8 4, i8 5, i8 6, i8 -128, i8 -128, i8 -128, i8 -128, i8
> -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8
> -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8
> -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8
> -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8
> -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8
> -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128>> 0
> Â Â Â Â Â 0x6019dbcc0: i64 = TargetConstantPool<<64 x i8> <i8 0, i8 1, i8 2, i8
> -128, i8 4, i8 5, i8 6, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8
> -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8
> -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8
> -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8
> -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8
> -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8
> -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128>> 0
> Â Â Â 0x6019db848: i8 = TargetConstant<1>
> Â Â Â 0x6019f1a68: i64 = Register %noreg
> Â Â Â 0x6019f20e8: i32 = TargetConstant<0>
> Â Â Â 0x601a23620: i32 = Register %noreg
> Â 0x6019dae20: i64 = FrameIndex<7>
> Â 0x6019f2288: i64 = undef
> In function: main
> clang-5.0: error: clang frontend command failed with exit code 70 (use -v to see
> invocation)
> clang version 5.0.1 (tags/RELEASE_501/final)
> Target: x86_64-unknown-windows-cygnus
> Thread model: posix
> InstalledDir: /usr/bin
> clang-5.0: note: diagnostic msg: PLEASE submit a bug report to and include the
> crash backtrace, preprocessed source, and associated run script.
> clang-5.0: note: diagnostic msg:
> ********************
>
> PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
> Preprocessed source(s) and associated run script(s) are located at:
> clang-5.0: note: diagnostic msg: /tmp/testbench2-31c6c0.cpp
> clang-5.0: note: diagnostic msg: /tmp/testbench2-31c6c0.sh
> clang-5.0: note: diagnostic msg:
>
> ********************
>
> The diagnostic files are included in the zip as diagnostic*
Just like your previous Clang bug report, this one, as detailed and complete as
any developer could want :-), should also go to the Clang bugtracker at
https://bugs.llvm.org.
..mark
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-08-12 9:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-06 8:58 Clang collapses on template with 64 parameters Agner Fog
2019-08-12 9:22 ` Mark Geisert
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).