summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed.bougacha@gmail.com>2015-02-05 18:15:59 +0000
committerAhmed Bougacha <ahmed.bougacha@gmail.com>2015-02-05 18:15:59 +0000
commitdb1da7a54cb784ec23ca8ea57133b9af45dd662c (patch)
treedd96596cf43f886c941e0e19e186e8d06194190c
parent7fc4583eda562daf9d3610d6e2623c60ca0690f6 (diff)
downloadbcm5719-llvm-db1da7a54cb784ec23ca8ea57133b9af45dd662c.tar.gz
bcm5719-llvm-db1da7a54cb784ec23ca8ea57133b9af45dd662c.zip
[CodeGen] Add isLoadExtLegalOrCustom helper to TargetLowering.
llvm-svn: 228322
-rw-r--r--llvm/include/llvm/Target/TargetLowering.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/include/llvm/Target/TargetLowering.h b/llvm/include/llvm/Target/TargetLowering.h
index a2d1c4caf20..12c4f9bb547 100644
--- a/llvm/include/llvm/Target/TargetLowering.h
+++ b/llvm/include/llvm/Target/TargetLowering.h
@@ -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.
OpenPOWER on IntegriCloud