summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/SystemZ
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-10-28 01:43:28 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-10-28 01:43:28 +0000
commit83896a59e138700045bbf18753bfa5aaf2f59b98 (patch)
treea473a6fc3a6fc474dc2070ba0a7d0a2063e4ce9d /llvm/lib/Target/SystemZ
parent4b46cbfc23f279c860eaa72f9ac75830b47527be (diff)
downloadbcm5719-llvm-83896a59e138700045bbf18753bfa5aaf2f59b98.tar.gz
bcm5719-llvm-83896a59e138700045bbf18753bfa5aaf2f59b98.zip
Add a second ValueType argument to isFPImmLegal.
llvm-svn: 85361
Diffstat (limited to 'llvm/lib/Target/SystemZ')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZISelLowering.cpp4
-rw-r--r--llvm/lib/Target/SystemZ/SystemZISelLowering.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
index 3a91df06bde..5c8cae0cd76 100644
--- a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
@@ -170,8 +170,8 @@ SDValue SystemZTargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) {
}
}
-bool SystemZTargetLowering::isFPImmLegal(const APFloat &Imm) const {
- if (UseSoftFloat)
+bool SystemZTargetLowering::isFPImmLegal(const APFloat &Imm, EVT VT) const {
+ if (UseSoftFloat || (VT != MVT::f32 && VT != MVT::f64))
return false;
// +0.0 lzer
diff --git a/llvm/lib/Target/SystemZ/SystemZISelLowering.h b/llvm/lib/Target/SystemZ/SystemZISelLowering.h
index 76af03de0ad..5bf1ed68c4c 100644
--- a/llvm/lib/Target/SystemZ/SystemZISelLowering.h
+++ b/llvm/lib/Target/SystemZ/SystemZISelLowering.h
@@ -92,7 +92,7 @@ namespace llvm {
/// 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) const;
+ virtual bool isFPImmLegal(const APFloat &Imm, EVT VT) const;
private:
SDValue LowerCCCCallTo(SDValue Chain, SDValue Callee,
OpenPOWER on IntegriCloud