llvm / llvm/llvm-project

MIPSr6: fail to build: compare doubles and select floats

Open
#173,592 5 comments 0 reactions 1 assignee Claimed by @wzssyqa View on GitHub
backend:MIPS crash llvm:SelectionDAG
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

```llvm
define float @ueq(double %lhs, double %rhs, float %true, float %false) {
entry:
%0 = fcmp ueq double %lhs, %rhs
%1 = select i1 %0, float %true, float %false
ret float %1
}
```

```
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:11957: void llvm::SelectionDAGISel::LowerArguments(const Function &): Assertion `EVT(Ins[i].VT) == InVals[i].getValueType() && "LowerFormalArguments emitted a value with the wrong type!"' failed.
```

It only happens when using `-debug` option.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.