From bc45119b4465f6045b88fbdaca8cb4780338b4f0 Mon Sep 17 00:00:00 2001 From: Justin Holewinski Date: Thu, 29 Nov 2012 14:26:24 +0000 Subject: Allow targets to prefer TypeSplitVector over TypePromoteInteger when computing the legalization method for vectors For some targets, it is desirable to prefer scalarizing instead of promoting to a larger legal type, such as . llvm-svn: 168882 --- llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen') 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. -- cgit v1.2.3