summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMISelLowering.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-10-28 01:44:26 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-10-28 01:44:26 +0000
commit4a609f3cefe5f62fbaa3c07771fa90a2d28051f8 (patch)
tree6ff8e540a89f4396d234c8aeab3d48731fc82965 /llvm/lib/Target/ARM/ARMISelLowering.h
parent83896a59e138700045bbf18753bfa5aaf2f59b98 (diff)
downloadbcm5719-llvm-4a609f3cefe5f62fbaa3c07771fa90a2d28051f8.tar.gz
bcm5719-llvm-4a609f3cefe5f62fbaa3c07771fa90a2d28051f8.zip
Use fconsts and fconstd to materialize small fp constants.
llvm-svn: 85362
Diffstat (limited to 'llvm/lib/Target/ARM/ARMISelLowering.h')
-rw-r--r--llvm/lib/Target/ARM/ARMISelLowering.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.h b/llvm/lib/Target/ARM/ARMISelLowering.h
index 7d85f458d8e..ac962c1a8a2 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.h
+++ b/llvm/lib/Target/ARM/ARMISelLowering.h
@@ -137,6 +137,13 @@ namespace llvm {
/// return the constant being splatted. The ByteSize field indicates the
/// number of bytes of each element [1248].
SDValue getVMOVImm(SDNode *N, unsigned ByteSize, SelectionDAG &DAG);
+
+ /// getVFPf32Imm / getVFPf64Imm - If the given fp immediate can be
+ /// materialized with a VMOV.f32 / VMOV.f64 (i.e. fconsts / fconstd)
+ /// instruction, returns its 8-bit integer representation. Otherwise,
+ /// returns -1.
+ int getVFPf32Imm(const APFloat &FPImm);
+ int getVFPf64Imm(const APFloat &FPImm);
}
//===--------------------------------------------------------------------===//
@@ -224,6 +231,12 @@ namespace llvm {
bool isShuffleMaskLegal(const SmallVectorImpl<int> &M, EVT VT) const;
bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const;
+
+ /// isFPImmLegal - Returns true if the target can instruction select the
+ /// specified FP immediate natively. If false, the legalizer will
+ /// materialize the FP immediate as a load from a constant pool.
+ virtual bool isFPImmLegal(const APFloat &Imm, EVT VT) const;
+
private:
/// Subtarget - Keep a pointer to the ARMSubtarget around so that we can
/// make the right decision when generating code for different targets.
OpenPOWER on IntegriCloud