Skip to content

Crash with MIPS16 multiply #48490

@jdeguire

Description

@jdeguire
Bugzilla Link 49146
Version 11.0
OS Linux
Attachments Clang output and crash report files
CC @atanasyan

Extended Description

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 >
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. 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions