Skip to content

flang/LoongArch "Do not know how to promote this operator" in DAG->DAG Pattern Instruction Selection #110995

Open
@martin-frbg

Description

@martin-frbg

Compiling the LAPACK parts of OpenBLAS on a Loongson 3A6000 running Debian sid currently fails with both 18.1.8 and 19.1.0
producing the following error messages. (This should also be reproducible with Reference-LAPACK from which these parts are copied verbatim, if you prefer to test with a project that is entirely in Fortran)

flang-new-18 -O2 -march=loongarch64 -fPIC -c -o slacon.o slacon.f
flang-new-18 -O2 -march=loongarch64 -fPIC -c -o slacn2.o slacn2.f
LLVM ERROR: Do not know how to promote this operator!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /usr/lib/llvm-18/bin/flang-new -fc1 -triple loongarch64-unknown-linux-gnu -emit-obj -fcolor-diagnostics -mrelocation-model pic -pic-level 2 -target-cpu loongarch64 -mframe-pointer=none -O2 -o slacon.o -x f95-cpp-input slacon.f
1.	Running pass 'Function Pass Manager' on module 'FIRModule'.
2.	Running pass 'LoongArch DAG->DAG Pattern Instruction Selection' on function '@slacon_'
LLVM ERROR: Do not know how to promote this operator!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /usr/lib/llvm-18/bin/flang-new -fc1 -triple loongarch64-unknown-linux-gnu -emit-obj -fcolor-diagnostics -mrelocation-model pic -pic-level 2 -target-cpu loongarch64 -mframe-pointer=none -O2 -o slacn2.o -x f95-cpp-input slacn2.f
1.	Running pass 'Function Pass Manager' on module 'FIRModule'.
2.	Running pass 'LoongArch DAG->DAG Pattern Instruction Selection' on function '@slacn2_'

Diagnostic output attached, this was originally reported in OpenMathLib/OpenBLAS#4907
slacon.f is at https://github.com/Reference-LAPACK/lapack/tree/master/SRC/slacon.f
slacon-dda0eb.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend:loongarchcrashPrefer [crash-on-valid] or [crash-on-invalid]

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions