[llvm-bugs] [Bug 49200] New: Crash with microMIPS + "-mfp64" on floating-point store
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Feb 15 15:37:09 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=49200
Bug ID: 49200
Summary: Crash with microMIPS + "-mfp64" on floating-point
store
Product: new-bugs
Version: 11.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: jesse.a.deguire at gmail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
Created attachment 24534
--> https://bugs.llvm.org/attachment.cgi?id=24534&action=edit
Clang output, crash report files, and bugpoint output
The following code will crash Clang with a stack trace when building it using
microMIPS, hardware floating-point, and the "-mfp64" option.
----------
#define __CMPLX(x, y, t) \
((union { _Complex t __z; t __xy[2]; }){.__xy = {(x),(y)}}.__z)
#define CMPLX(x, y) __CMPLX(x, y, double)
void foo(void)
{
double bleh = CMPLX(0, 0);
}
----------
I realized after I put together a report that the assignment probably isn't
correct, but changing it to "_Complex double bleh" caused the same crash.
Here is the beginning portion of the crash, which also shows the options I
invoke Clang with.
----------
fatal error: error in backend: Cannot select: t15: ch = store<(store 8 into
%ir.bleh.imagp)> t14, t10, t12, undef:i32, micromips_fpu_cmplx_check.c:24:21
t10: f64,ch = load<(dereferenceable load 8 from %ir.__z.imagp)> t22, t7,
undef:i32, micromips_fpu_cmplx_check.c:24:28
t7: i32 = add nuw FrameIndex:i32<1>, Constant:i32<8>,
micromips_fpu_cmplx_check.c:24:28
t1: i32 = FrameIndex<1>
t6: i32 = Constant<8>
t4: i32 = undef
t12: i32 = add nuw FrameIndex:i32<0>, Constant:i32<8>,
micromips_fpu_cmplx_check.c:24:21
t11: i32 = FrameIndex<0>
t6: i32 = Constant<8>
t4: i32 = undef
In function: foo
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: ./pic32clang/install/bin/clang -g -target
mipsel-linux-gnu-musl -march=mips32r5 -mdspr2 -mmicromips -mhard-float -mfp64
-G0 -fomit-frame-pointer -O0 -c -o micromips_fpu_cmplx_check.o
micromips_fpu_cmplx_check.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module
'micromips_fpu_cmplx_check.c'.
4. Running pass 'MIPS DAG->DAG Pattern Instruction Selection' on function
'@foo'
----------
Removing EITHER the "-mmicromips" or the "-mfp64" option will allow this code
to build.
I followed the "How to submit an LLVM bug report" document to generate a .bc
file to give to "llc", which also crashed. I then used "bugpoint -llc-safe"
with that .bc file to generate more files. These files, the original sample
code, the files requested by the crash log, and the output of Clang and llc are
included in the attached ZIP file.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210215/68f40e00/attachment.html>
More information about the llvm-bugs
mailing list