[llvm] r283209 - [mips][fastisel] Consider soft-float an unsupported floating point mode
Simon Dardis via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 4 03:35:07 PDT 2016
Author: sdardis
Date: Tue Oct 4 05:35:07 2016
New Revision: 283209
URL: http://llvm.org/viewvc/llvm-project?rev=283209&view=rev
Log:
[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
Added:
llvm/trunk/test/CodeGen/Mips/Fast-ISel/fast-isel-softfloat-lower-args.ll
Modified:
llvm/trunk/lib/Target/Mips/MipsFastISel.cpp
Modified: llvm/trunk/lib/Target/Mips/MipsFastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsFastISel.cpp?rev=283209&r1=283208&r2=283209&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsFastISel.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsFastISel.cpp Tue Oct 4 05:35:07 2016
@@ -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()) {
Added: llvm/trunk/test/CodeGen/Mips/Fast-ISel/fast-isel-softfloat-lower-args.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/Fast-ISel/fast-isel-softfloat-lower-args.ll?rev=283209&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/Fast-ISel/fast-isel-softfloat-lower-args.ll (added)
+++ llvm/trunk/test/CodeGen/Mips/Fast-ISel/fast-isel-softfloat-lower-args.ll Tue Oct 4 05:35:07 2016
@@ -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
+}
More information about the llvm-commits
mailing list