summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2012-12-10 21:41:58 +0000
committerTom Stellard <thomas.stellard@amd.com>2012-12-10 21:41:58 +0000
commit30e2aa50153982d26b92e2f9c8dd24db2af722af (patch)
treef892398d86239015008071971371803b49a253d9 /llvm
parentb785bd776c409ad12572654ec29e932872753064 (diff)
downloadbcm5719-llvm-30e2aa50153982d26b92e2f9c8dd24db2af722af.tar.gz
bcm5719-llvm-30e2aa50153982d26b92e2f9c8dd24db2af722af.zip
LegalizeDAG: Allow type promotion of scalar loads
llvm-svn: 169773
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index eb8df32e17b..2c249fcaf96 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -890,10 +890,9 @@ void SelectionDAGLegalize::LegalizeLoadOps(SDNode *Node) {
break;
}
case TargetLowering::Promote: {
- // Only promote a load of vector type to another.
- assert(VT.isVector() && "Cannot promote this load!");
- // Change base type to a different vector type.
EVT NVT = TLI.getTypeToPromoteTo(Node->getOpcode(), VT);
+ assert(NVT.getSizeInBits() == VT.getSizeInBits() &&
+ "Can only promote loads to same size type");
SDValue Res = DAG.getLoad(NVT, dl, Chain, Ptr, LD->getPointerInfo(),
LD->isVolatile(), LD->isNonTemporal(),
OpenPOWER on IntegriCloud