diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-10-28 01:43:28 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-10-28 01:43:28 +0000 |
commit | 83896a59e138700045bbf18753bfa5aaf2f59b98 (patch) | |
tree | a473a6fc3a6fc474dc2070ba0a7d0a2063e4ce9d /llvm/lib/Target/SystemZ | |
parent | 4b46cbfc23f279c860eaa72f9ac75830b47527be (diff) | |
download | bcm5719-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.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/Target/SystemZ/SystemZISelLowering.h | 2 |
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, |