[SystemZ] Wait with selection of legal vector/FP constants until Select().
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Tue, 26 Feb 2019 16:47:59 +0000 (16:47 +0000)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Tue, 26 Feb 2019 16:47:59 +0000 (16:47 +0000)
commitc110b5b69f19700939a56d08218dfb0abb577af9
tree1af64f4ec0a342f39b5bf24f9fd23991b4c0e639
parent41aba567d991c2bd551c72c73b8f76f2de392984
[SystemZ]  Wait with selection of legal vector/FP constants until Select().

This patch aims to make sure that any such constant that can be generated
with a vector instruction (for example VGBM) is recognized as such during
legalization and kept as a target independent node through post-legalize
DAGCombining.

Two new functions named isVectorConstantLegal() and loadVectorConstant()
replace old ways of handling vector/FP constants.

A new struct named SystemZVectorConstantInfo is used to cache the results of
isVectorConstantLegal() and pass them onto loadVectorConstant().

Support for fp128 constants in the presence of FeatureVectorEnhancements1
(z14) has been added.

Review: Ulrich Weigand
https://reviews.llvm.org/D58270

llvm-svn: 354896
llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
llvm/lib/Target/SystemZ/SystemZISelLowering.h
llvm/lib/Target/SystemZ/SystemZInstrVector.td
llvm/lib/Target/SystemZ/SystemZOperators.td
llvm/test/CodeGen/SystemZ/fp-const-11.ll
llvm/test/CodeGen/SystemZ/vec-const-05.ll
llvm/test/CodeGen/SystemZ/vec-const-06.ll
llvm/test/CodeGen/SystemZ/vec-const-19.ll [new file with mode: 0644]