aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/SystemZ/SystemZISelLowering.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-07-16 14:24:16 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-07-16 14:24:16 +0000
commit1ada84daaf34ea8e30e5dcb8a7970416606fdd83 (patch)
tree77cc58180a5366b8a9dcab79295efb857e9d2423 /lib/Target/SystemZ/SystemZISelLowering.cpp
parent5753f47f5bc965ec6a891a768dc7f1a26d655ac8 (diff)
Make FP zero to be legal FP immediate via LOAD ZERO
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76034 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SystemZ/SystemZISelLowering.cpp')
-rw-r--r--lib/Target/SystemZ/SystemZISelLowering.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/SystemZ/SystemZISelLowering.cpp b/lib/Target/SystemZ/SystemZISelLowering.cpp
index 01ecf4fae9..4144f970d9 100644
--- a/lib/Target/SystemZ/SystemZISelLowering.cpp
+++ b/lib/Target/SystemZ/SystemZISelLowering.cpp
@@ -51,6 +51,11 @@ SystemZTargetLowering::SystemZTargetLowering(SystemZTargetMachine &tm) :
if (!UseSoftFloat) {
addRegisterClass(MVT::f32, SystemZ::FP32RegisterClass);
addRegisterClass(MVT::f64, SystemZ::FP64RegisterClass);
+
+ addLegalFPImmediate(APFloat(+0.0)); // lzer
+ addLegalFPImmediate(APFloat(+0.0f)); // lzdr
+ addLegalFPImmediate(APFloat(-0.0)); // lzer + lner
+ addLegalFPImmediate(APFloat(-0.0f)); // lzdr + lndr
}
// Compute derived properties from the register classes