[llvm-commits] [llvm] r169773 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Tom Stellard
thomas.stellard at amd.com
Mon Dec 10 13:41:58 PST 2012
Author: tstellar
Date: Mon Dec 10 15:41:58 2012
New Revision: 169773
URL: http://llvm.org/viewvc/llvm-project?rev=169773&view=rev
Log:
LegalizeDAG: Allow type promotion of scalar loads
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=169773&r1=169772&r2=169773&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Dec 10 15:41:58 2012
@@ -890,10 +890,9 @@
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(),
More information about the llvm-commits
mailing list