summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-10-13 20:07:41 +0000
committerChris Lattner <sabre@nondot.org>2005-10-13 20:07:41 +0000
commitd23f4b741192f53f7b51472ab6aa09e6804af0a9 (patch)
tree0b4a2ce740894ea190f0c079942d0174d0989766 /llvm/lib/CodeGen
parent8e022b3d8940f451fcb4df233e737ab378d40708 (diff)
downloadbcm5719-llvm-d23f4b741192f53f7b51472ab6aa09e6804af0a9.tar.gz
bcm5719-llvm-d23f4b741192f53f7b51472ab6aa09e6804af0a9.zip
Implement PromoteOp for *EXTLOAD, allowing MallocBench/gs to Legalize
llvm-svn: 23715
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 8ea3eb78847..3fcf45afe38 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -2350,6 +2350,16 @@ SDOperand SelectionDAGLegalize::PromoteOp(SDOperand Op) {
// Remember that we legalized the chain.
AddLegalizedOperand(Op.getValue(1), Result.getValue(1));
break;
+ case ISD::SEXTLOAD:
+ case ISD::ZEXTLOAD:
+ case ISD::EXTLOAD:
+ Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain.
+ Tmp2 = LegalizeOp(Node->getOperand(1)); // Legalize the pointer.
+ Result = DAG.getNode(Node->getOpcode(), NVT, Tmp1, Tmp2,
+ Node->getOperand(2), Node->getOperand(3));
+ // Remember that we legalized the chain.
+ AddLegalizedOperand(Op.getValue(1), Result.getValue(1));
+ break;
case ISD::SELECT:
switch (getTypeAction(Node->getOperand(0).getValueType())) {
case Expand: assert(0 && "It's impossible to expand bools");
OpenPOWER on IntegriCloud