[llvm] r228322 - [CodeGen] Add isLoadExtLegalOrCustom helper to TargetLowering.
Ahmed Bougacha
ahmed.bougacha at gmail.com
Thu Feb 5 10:15:59 PST 2015
Author: ab
Date: Thu Feb 5 12:15:59 2015
New Revision: 228322
URL: http://llvm.org/viewvc/llvm-project?rev=228322&view=rev
Log:
[CodeGen] Add isLoadExtLegalOrCustom helper to TargetLowering.
Modified:
llvm/trunk/include/llvm/Target/TargetLowering.h
Modified: llvm/trunk/include/llvm/Target/TargetLowering.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=228322&r1=228321&r2=228322&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetLowering.h (original)
+++ llvm/trunk/include/llvm/Target/TargetLowering.h Thu Feb 5 12:15:59 2015
@@ -574,6 +574,14 @@ public:
getLoadExtAction(ExtType, ValVT, MemVT) == Legal;
}
+ /// Return true if the specified load with extension is legal or custom
+ /// on this target.
+ bool isLoadExtLegalOrCustom(unsigned ExtType, EVT ValVT, EVT MemVT) const {
+ return ValVT.isSimple() && MemVT.isSimple() &&
+ (getLoadExtAction(ExtType, ValVT, MemVT) == Legal ||
+ getLoadExtAction(ExtType, ValVT, MemVT) == Custom);
+ }
+
/// Return how this store with truncation should be treated: either it is
/// legal, needs to be promoted to a larger size, needs to be expanded to some
/// other code sequence, or the target has a custom expander for it.
More information about the llvm-commits
mailing list