mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-14 23:48:49 +00:00
[mips][fastisel] Consider soft-float an unsupported floating point mode
Treat soft-float as unsupported for fast-isel. Additionally, ensure we check that lowering f32 arguments also considers the case of soft-float mode. Reviewers: ehostunreach, vkalintiris, zoran.jovanovic Differential Review: https://reviews.llvm.org/D24505 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283209 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cd988cd581
commit
c072c50d24
@ -216,7 +216,7 @@ public:
|
||||
!Subtarget->inMicroMipsMode() && Subtarget->hasMips32();
|
||||
TargetSupported =
|
||||
ISASupported && TM.isPositionIndependent() && getABI().IsO32();
|
||||
UnsupportedFPMode = Subtarget->isFP64bit();
|
||||
UnsupportedFPMode = Subtarget->isFP64bit() || Subtarget->useSoftFloat();
|
||||
}
|
||||
|
||||
unsigned fastMaterializeAlloca(const AllocaInst *AI) override;
|
||||
@ -1365,6 +1365,10 @@ bool MipsFastISel::fastLowerArguments() {
|
||||
break;
|
||||
|
||||
case MVT::f32:
|
||||
if (UnsupportedFPMode) {
|
||||
DEBUG(dbgs() << ".. .. gave up (UnsupportedFPMode)\n");
|
||||
return false;
|
||||
}
|
||||
if (NextFGR32 == FGR32ArgRegs.end()) {
|
||||
DEBUG(dbgs() << ".. .. gave up (ran out of FGR32 arguments)\n");
|
||||
return false;
|
||||
@ -1381,7 +1385,7 @@ bool MipsFastISel::fastLowerArguments() {
|
||||
|
||||
case MVT::f64:
|
||||
if (UnsupportedFPMode) {
|
||||
DEBUG(dbgs() << ".. .. gave up (UnsupportedFPMode\n");
|
||||
DEBUG(dbgs() << ".. .. gave up (UnsupportedFPMode)\n");
|
||||
return false;
|
||||
}
|
||||
if (NextAFGR64 == AFGR64ArgRegs.end()) {
|
||||
|
@ -0,0 +1,11 @@
|
||||
; RUN: not llc -march=mipsel -mcpu=mips32r2 -mattr=+soft-float \
|
||||
; RUN: -O0 -fast-isel-abort=3 -relocation-model=pic < %s
|
||||
|
||||
; Test that FastISel aborts instead of trying to lower arguments for soft-float.
|
||||
|
||||
define void @__signbit(double %__x) {
|
||||
entry:
|
||||
%__x.addr = alloca double, align 8
|
||||
store double %__x, double* %__x.addr, align 8
|
||||
ret void
|
||||
}
|
Loading…
Reference in New Issue
Block a user