From 00cb95c9bef6b4d96994112422d9d66679dfe986 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 14 Dec 2005 07:58:38 +0000 Subject: [PATCH] Fix a miscompilation in crafty due to a recent patch git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24706 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index acd80cf0dcf..c7cc6916ab9 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -1582,7 +1582,7 @@ SDOperand DAGCombiner::visitZERO_EXTEND(SDNode *N) { // fold (zext (truncate x)) -> (zextinreg x) iff x size == zext size. if (N0.getOpcode() == ISD::TRUNCATE && N0.getOperand(0).getValueType() == VT&& !AfterLegalize) - return DAG.getZeroExtendInReg(N0.getOperand(0), VT); + return DAG.getZeroExtendInReg(N0.getOperand(0), N0.getValueType()); // fold (zext (load x)) -> (zext (truncate (zextload x))) if (N0.getOpcode() == ISD::LOAD && N0.hasOneUse()) { SDOperand ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, VT, N0.getOperand(0),