llvm-project
llvm-project copied to clipboard
split-complex.ll causes llc to crash on AArch64/Windows
Stack dump:
0. Program arguments: c:\\users\\omair\\work\\llvm-dev\\build\\bin\\llc.exe -mtriple=aarch64-pc-windows-msvc -O0 -filetype=obj -o C:\\Users\\omair\\work\\llvm-dev\\build\\test\\DebugInfo\\ARM\\Output\\split-complex.ll.tmp.o C:\\Users\\omair\\work\\llvm-dev\\llvm-project\\llvm\\test\\DebugInfo\\ARM\\split-complex.ll
1. Running pass 'Function Pass Manager' on module 'C:\Users\omair\work\llvm-dev\llvm-project\llvm\test\DebugInfo\ARM\split-complex.ll'.
2. Running pass 'IRTranslator' on function '@f'
Exception Code: 0xC000001D
#0 0x00007ff60a1118ec (c:\users\omair\work\llvm-dev\build\bin\llc.exe+0x10518ec)
#1 0x00007ffcd65451b0 (C:\WINDOWS\System32\ucrtbase.dll+0x751b0)
#2 0x00007ffcd6546150 (C:\WINDOWS\System32\ucrtbase.dll+0x76150)
#3 0x00007ff6093b016c (c:\users\omair\work\llvm-dev\build\bin\llc.exe+0x2f016c)
#4 0x00007ff6093aff8c (c:\users\omair\work\llvm-dev\build\bin\llc.exe+0x2eff8c)
#5 0x00007ff60a249e04 (c:\users\omair\work\llvm-dev\build\bin\llc.exe+0x1189e04)
#6 0x00007ff60a2edfb8 (c:\users\omair\work\llvm-dev\build\bin\llc.exe+0x122dfb8)
#7 0x00007ff609567d14 (c:\users\omair\work\llvm-dev\build\bin\llc.exe+0x4a7d14)
error: command failed with exit status: 3221225501
@llvm/issue-subscribers-backend-aarch64
arm_aapcscc is unsupported calling convention on aarch64. I guess this should not be a valid issue.
Looking at the test https://github.com/llvm/llvm-project/blob/main/llvm/test/DebugInfo/ARM/split-complex.ll it doesn't run the code so that shouldn't be a problem.
I see what you mean though, why is the test calling llc with an aarch64 triple when the file itself sets a triple.
c:\\users\\omair\\work\\llvm-dev\\build\\bin\\llc.exe -mtriple=aarch64-pc-windows-msvc
target triple = "thumbv7-apple-unknown-macho"
Perhaps the file should normally override that but some feature used by this test case doesn't follow that logic? An asserts build would help confirm.
iirc, the target provided at the command line always overrides the triple in the LLVM IR file.
I suppose because this only checks dwarf and IR output it works 99% of the time then. Simple fix is to pass the triple in the RUN line instead.
I think the issue is weirder than that. %llc_dwarf
expands to llc
, except when config.target_triple is an msvc triple on windows, where -mtriple=
is passed with the equivalent gnu triple - see llvm/test/lit.cfg.py
line 107 or so. In this case, this code should have added -mtriple=aarch64-pc-windows-gnu
but hasn't?
We should probably switch the testcase to using %llc -mtriple=<something valid>
, and in fact we should probably avoid %llc_dwarf
in any target-specific DebugInfo tests entirely. I think there are also uses in llvm/test/DebugInfo/ARM/bitfield.ll
and llvm/test/DebugInfo/ARM/float-args.ll
. I'll prepare a patch for this.
Patch here: https://reviews.llvm.org/D136066
@llvm/issue-subscribers-backend-arm