[llvm] r285576 - [SystemZ] Guard LEFR/LFER with FeatureVector

Ulrich Weigand via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 31 07:28:43 PDT 2016


Author: uweigand
Date: Mon Oct 31 09:28:43 2016
New Revision: 285576

URL: http://llvm.org/viewvc/llvm-project?rev=285576&view=rev
Log:
[SystemZ] Guard LEFR/LFER with FeatureVector

The LEFR/LFER pseudos are aliases for vector instructions and should
therefore be guared by FeatureVector.  If they aren't, the TableGen
scheduler definition checking might complain that there is no data
for those pseudos for pre-z13 machines.

No functional change intended. 


Modified:
    llvm/trunk/lib/Target/SystemZ/SystemZInstrVector.td

Modified: llvm/trunk/lib/Target/SystemZ/SystemZInstrVector.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZInstrVector.td?rev=285576&r1=285575&r2=285576&view=diff
==============================================================================
--- llvm/trunk/lib/Target/SystemZ/SystemZInstrVector.td (original)
+++ llvm/trunk/lib/Target/SystemZ/SystemZInstrVector.td Mon Oct 31 09:28:43 2016
@@ -1079,11 +1079,13 @@ def : Pat<(v2i64 (z_replicate GR64:$scal
 
 // Moving 32-bit values between GPRs and FPRs can be done using VLVGF
 // and VLGVF.
-def LEFR : UnaryAliasVRS<VR32, GR32>;
-def LFER : UnaryAliasVRS<GR64, VR32>;
-def : Pat<(f32 (bitconvert (i32 GR32:$src))), (LEFR GR32:$src)>;
-def : Pat<(i32 (bitconvert (f32 VR32:$src))),
-          (EXTRACT_SUBREG (LFER VR32:$src), subreg_l32)>;
+let Predicates = [FeatureVector] in {
+  def LEFR : UnaryAliasVRS<VR32, GR32>;
+  def LFER : UnaryAliasVRS<GR64, VR32>;
+  def : Pat<(f32 (bitconvert (i32 GR32:$src))), (LEFR GR32:$src)>;
+  def : Pat<(i32 (bitconvert (f32 VR32:$src))),
+            (EXTRACT_SUBREG (LFER VR32:$src), subreg_l32)>;
+}
 
 // Floating-point values are stored in element 0 of the corresponding
 // vector register.  Scalar to vector conversion is just a subreg and




More information about the llvm-commits mailing list