Open Quuxplusone opened 6 years ago
Running with -debug:
Machine Function
********** EXPANDING POST-RA PSEUDO INSTRS **********
********** Function: f
real copy: renamable $rcx = COPY $rsp
replaced by: $rcx = MOV64rr $rsp
real copy: $rsp = COPY killed renamable $rcx
replaced by: $rsp = MOV64rr killed $rcx
real copy: renamable $eax = COPY killed renamable $rax
Cannot copy RAX to EAX
Cannot emit physreg copy instruction
UNREACHABLE executed at ../lib/Target/X86/X86InstrInfo.cpp:3112!
There looks to be an assumption in FunctionLoweringInfo::getOrCreateSwiftErrorVReg that the switch error store size should be equal to the pointer size.
Yes that is an unverified assumption.
The intended use of swifterror is to pass/return a pointer in a register.
_Bug 35767 has been marked as a duplicate of this bug._
Attached build.log.bz2
(59592 bytes, application/x-bzip): llvm build failure log (compressed)
Previous attachment is compilation of LLVM with CLang and LLD linker with polly optimizations enabled for 32bit (version 9).
The failure does not reproduce in a 64bit build.
(In reply to David C. Manuelda from comment #6)
> Previous attachment is compilation of LLVM with CLang and LLD linker with
> polly optimizations enabled for 32bit (version 9).
>
> The failure does not reproduce in a 64bit build.
(and -flto=thin enabled)
(In reply to David C. Manuelda from comment #6)
> Previous attachment is compilation of LLVM with CLang and LLD linker with
> polly optimizations enabled for 32bit (version 9).
>
> The failure does not reproduce in a 64bit build.
Did the compiler give you a preprocessed source file and script to submit?
(In reply to Craig Topper from comment #8)
> (In reply to David C. Manuelda from comment #6)
> > Previous attachment is compilation of LLVM with CLang and LLD linker with
> > polly optimizations enabled for 32bit (version 9).
> >
> > The failure does not reproduce in a 64bit build.
>
> Did the compiler give you a preprocessed source file and script to submit?
This is a gentoo build, I can provide config.log and the already provided
build.log, but since I have this into a compressed system image chrooted, I can
reproduce 100% of the times, so if you give me instruction I can do more
actions regard this failure.
(In reply to David C. Manuelda from comment #9)
> (In reply to Craig Topper from comment #8)
> > (In reply to David C. Manuelda from comment #6)
> > > Previous attachment is compilation of LLVM with CLang and LLD linker with
> > > polly optimizations enabled for 32bit (version 9).
> > >
> > > The failure does not reproduce in a 64bit build.
> >
> > Did the compiler give you a preprocessed source file and script to submit?
>
> This is a gentoo build, I can provide config.log and the already provided
> build.log, but since I have this into a compressed system image chrooted, I
> can reproduce 100% of the times, so if you give me instruction I can do more
> actions regard this failure.
Or even, share the image that you can chroot to it and try with emerge -1 llvm,
whatever you need just feel free to ask.
Normally when clang crashes it generates a shell script and a preprocessed source file and instructions about where to file a bug. Did that not happen in this case? That's what I need.
(In reply to Craig Topper from comment #11)
> Normally when clang crashes it generates a shell script and a preprocessed
> source file and instructions about where to file a bug. Did that not happen
> in this case? That's what I need.
Sorry, I just get this message:
LLVM ERROR: Cannot emit physreg copy instruction
clang-9: error: linker command failed with exit code 1 (use -v to see
invocation)
Tried with both, LLD and Gold linker producing the same failure with same
message
Oh. I guess LTO doesn't generate that report.
(In reply to Craig Topper from comment #13)
> Oh. I guess LTO doesn't generate that report.
Building with lto disabled now makes clang crash with a Segmentation Fault
signal, I don't know if that's related but I'm attaching the preprocessed
output as well as the stack trace, because it is weird that just disabling LTO
makes now this SIGSEGV.
If the issue is not related please tell me.
Attached file_38545.txt
(259 bytes, text/plain): Bug preprocessed info
build.log.bz2
(59592 bytes, application/x-bzip)file_38545.txt
(259 bytes, text/plain)