aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-09-21 06:17:39 +0000
committerChris Lattner <sabre@nondot.org>2006-09-21 06:17:39 +0000
commitbf3708794f4dca6e959247a3fe7cbe0cb5348eeb (patch)
tree59ed91d34905e669c1113cc362d565ffaca6d351 /lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parentb13f83eb23ad08cdee76b1ef6c2ae85782dd2dd4 (diff)
Check the right value type. This fixes 186.crafty on x86
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30560 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 2f68106804..64014dcb05 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -1768,7 +1768,8 @@ SDOperand DAGCombiner::visitSIGN_EXTEND(SDNode *N) {
// fold (sext (truncate x)) -> (sextinreg x).
if (N0.getOpcode() == ISD::TRUNCATE &&
- (!AfterLegalize || TLI.isOperationLegal(ISD::SIGN_EXTEND_INREG, VT))) {
+ (!AfterLegalize || TLI.isOperationLegal(ISD::SIGN_EXTEND_INREG,
+ N0.getValueType()))) {
SDOperand Op = N0.getOperand(0);
if (Op.getValueType() < VT) {
Op = DAG.getNode(ISD::ANY_EXTEND, VT, Op);