summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
diff options
context:
space:
mode:
authorJustin Holewinski <jholewinski@nvidia.com>2012-11-29 14:26:24 +0000
committerJustin Holewinski <jholewinski@nvidia.com>2012-11-29 14:26:24 +0000
commitbc45119b4465f6045b88fbdaca8cb4780338b4f0 (patch)
tree2652af8619b324082f7134ef77edaffc7ae4dd41 /llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
parent857d9d2a59cdbd9038b14a3d1a682a295cf57b6b (diff)
downloadbcm5719-llvm-bc45119b4465f6045b88fbdaca8cb4780338b4f0.tar.gz
bcm5719-llvm-bc45119b4465f6045b88fbdaca8cb4780338b4f0.zip
Allow targets to prefer TypeSplitVector over TypePromoteInteger when computing the legalization method for vectors
For some targets, it is desirable to prefer scalarizing <N x i1> instead of promoting to a larger legal type, such as <N x i32>. llvm-svn: 168882
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index 794935dad51..9ddcf7a9c6b 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -825,7 +825,7 @@ void TargetLowering::computeRegisterProperties() {
// that wider vector type.
EVT EltVT = VT.getVectorElementType();
unsigned NElts = VT.getVectorNumElements();
- if (NElts != 1) {
+ if (NElts != 1 && !shouldSplitVectorElementType(EltVT)) {
bool IsLegalWiderType = false;
// First try to promote the elements of integer vectors. If no legal
// promotion was found, fallback to the widen-vector method.
OpenPOWER on IntegriCloud