Proper FP extloads
authorAnton Korobeynikov <asl@math.spbu.ru>
Thu, 16 Jul 2009 14:22:46 +0000 (14:22 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Thu, 16 Jul 2009 14:22:46 +0000 (14:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76028 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/SystemZ/SystemZISelLowering.cpp
lib/Target/SystemZ/SystemZInstrFP.td

index 83afcf404aa4c5aed00f5c11a0f3576267d469ce..01ecf4fae90ce3790d0e56faa28a7078d31d1e35 100644 (file)
@@ -65,13 +65,13 @@ SystemZTargetLowering::SystemZTargetLowering(SystemZTargetMachine &tm) :
   setLoadExtAction(ISD::ZEXTLOAD, MVT::i1, Promote);
   setLoadExtAction(ISD::EXTLOAD,  MVT::i1, Promote);
 
-  setLoadExtAction(ISD::SEXTLOAD, MVT::f32, Promote);
-  setLoadExtAction(ISD::ZEXTLOAD, MVT::f32, Promote);
-  setLoadExtAction(ISD::EXTLOAD,  MVT::f32, Promote);
+  setLoadExtAction(ISD::SEXTLOAD, MVT::f32, Expand);
+  setLoadExtAction(ISD::ZEXTLOAD, MVT::f32, Expand);
+  setLoadExtAction(ISD::EXTLOAD,  MVT::f32, Expand);
 
-  setLoadExtAction(ISD::SEXTLOAD, MVT::f64, Promote);
-  setLoadExtAction(ISD::ZEXTLOAD, MVT::f64, Promote);
-  setLoadExtAction(ISD::EXTLOAD,  MVT::f64, Promote);
+  setLoadExtAction(ISD::SEXTLOAD, MVT::f64, Expand);
+  setLoadExtAction(ISD::ZEXTLOAD, MVT::f64, Expand);
+  setLoadExtAction(ISD::EXTLOAD,  MVT::f64, Expand);
 
   setStackPointerRegisterToSaveRestore(SystemZ::R15D);
   setSchedulingPreference(SchedulingForLatency);
index 1c1b0ebb3533d11018b6376e204fed585f09d9bd..b54cd26c6d21cfa1af1620453787c703336ff85c 100644 (file)
@@ -167,10 +167,12 @@ def FROUND64r32 : Pseudo<(outs FP32:$dst), (ins FP64:$src),
                          "ledbr\t{$dst, $src}",
                          [(set FP32:$dst, (fround FP64:$src))]>;
 
-// FIXME: memory variant
 def FEXT32r64   : Pseudo<(outs FP64:$dst), (ins FP32:$src),
                          "ldebr\t{$dst, $src}",
                          [(set FP64:$dst, (fextend FP32:$src))]>;
+def FEXT32m64   : Pseudo<(outs FP64:$dst), (ins rriaddr:$src),
+                         "ldeb\t{$dst, $src}",
+                         [(set FP64:$dst, (fextend (load rriaddr:$src)))]>;
 
 let Defs = [PSW] in {
 def FCONVFP32   : Pseudo<(outs FP32:$dst), (ins GR32:$src),