diff options
author | Chad Rosier <mcrosier@codeaurora.org> | 2014-04-30 15:29:57 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@codeaurora.org> | 2014-04-30 15:29:57 +0000 |
commit | 864e35db0af705b515f2e300debf96f0b2d55406 (patch) | |
tree | c5257e9b5f0f981688317c44bde230404dea4a97 /llvm/lib/Target/ARM64/ARM64FastISel.cpp | |
parent | 194924e64b0ff9d3951f1827d70eb63cb2bfd22e (diff) | |
download | bcm5719-llvm-864e35db0af705b515f2e300debf96f0b2d55406.tar.gz bcm5719-llvm-864e35db0af705b515f2e300debf96f0b2d55406.zip |
[ARM64][fast-isel] Fast-isel doesn't know how to handle f128.
llvm-svn: 207659
Diffstat (limited to 'llvm/lib/Target/ARM64/ARM64FastISel.cpp')
-rw-r--r-- | llvm/lib/Target/ARM64/ARM64FastISel.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM64/ARM64FastISel.cpp b/llvm/lib/Target/ARM64/ARM64FastISel.cpp index 0fce1cc64e3..c43f2af15be 100644 --- a/llvm/lib/Target/ARM64/ARM64FastISel.cpp +++ b/llvm/lib/Target/ARM64/ARM64FastISel.cpp @@ -197,6 +197,9 @@ unsigned ARM64FastISel::TargetMaterializeAlloca(const AllocaInst *AI) { } unsigned ARM64FastISel::ARM64MaterializeFP(const ConstantFP *CFP, MVT VT) { + if (VT != MVT::f32 && VT != MVT::f64) + return 0; + const APFloat Val = CFP->getValueAPF(); bool is64bit = (VT == MVT::f64); @@ -418,7 +421,11 @@ bool ARM64FastISel::isTypeLegal(Type *Ty, MVT &VT) { return false; VT = evt.getSimpleVT(); - // Handle all legal types, i.e. a register that will directly hold this + // This is a legal type, but it's not something we handle in fast-isel. + if (VT == MVT::f128) + return false; + + // Handle all other legal types, i.e. a register that will directly hold this // value. return TLI.isTypeLegal(VT); } @@ -1107,6 +1114,8 @@ bool ARM64FastISel::SelectFPToInt(const Instruction *I, bool Signed) { return false; EVT SrcVT = TLI.getValueType(I->getOperand(0)->getType(), true); + if (SrcVT == MVT::f128) + return false; unsigned Opc; if (SrcVT == MVT::f64) { @@ -1132,6 +1141,8 @@ bool ARM64FastISel::SelectIntToFP(const Instruction *I, bool Signed) { MVT DestVT; if (!isTypeLegal(I->getType(), DestVT) || DestVT.isVector()) return false; + assert ((DestVT == MVT::f32 || DestVT == MVT::f64) && + "Unexpected value type."); unsigned SrcReg = getRegForValue(I->getOperand(0)); if (SrcReg == 0) @@ -1578,6 +1589,8 @@ bool ARM64FastISel::SelectRet(const Instruction *I) { if (!RVEVT.isSimple()) return false; MVT RVVT = RVEVT.getSimpleVT(); + if (RVVT == MVT::f128) + return false; MVT DestVT = VA.getValVT(); // Special handling for extended integers. if (RVVT != DestVT) { |