[llvm-bugs] [Bug 49146] New: Crash with MIPS16 multiply

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Feb 11 06:23:01 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=49146

            Bug ID: 49146
           Summary: Crash with MIPS16 multiply
           Product: new-bugs
           Version: 11.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          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 24515
  --> https://bugs.llvm.org/attachment.cgi?id=24515&action=edit
Clang output and crash report files

Clang 11.0.1 crashes with a stack trace and message telling me to file a bug
here when I build a module containing the following code in MIPS16 mode:

----------
static unsigned baz(unsigned n, unsigned m)
{
/* NOTE: Using any of these other operators works fine,
         only the multiply causes the crash.
 */
//    return n + m;
//    return n - m;
    return n * m;
//    return n / m;
}

int bar(void)
{
    return 42;
}

void foo(void)
{
    int bleh = bar();
    baz(bleh, 55);
}
----------

This is on a version of Clang I built in Debug mode for x86, MIPS, and ARM
targets on Ubuntu 20.04 on Windows 10 WSL.

Here is the start of the output from Clang, the rest is included in the
attached ZIP file:

----------
fatal error: error in backend: Not supported instr: <MCInst 464 <MCOperand
Reg:345> <MCOperand Reg:345> <MCOperand Reg:346>>
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 -c mips16_simple.c -o
mips16_simple.o -target mipsel-linux-gnu-musl -march=mips32r2 -g -O0
-msoft-float -mfloat-abi=soft -mips16 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'mips16_simple.c'.
4.      Running pass 'Mips Assembly Printer' on function '@baz'
----------

Also included in the ZIP file are the two files that the crash report told me
to include. The document "How To Submit an LLVM Bug Report" says to run "llc"
to see if that crashes, but it does not (this is different from my
previously-submitted bug #49042, which does crash llc).

-- 
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/20210211/22ae2f54/attachment.html>


More information about the llvm-bugs mailing list