From fdb230a154ead49cf0ded5b4587be994ec2f43e0 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 10 Apr 2012 00:16:22 +0000 Subject: Don't try to zExt just to check if an integer constant is zero, it might not fit in a i64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154364 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen') diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index dbc1ca909a..cf7ce587f3 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -4431,9 +4431,9 @@ static bool isTruncateOf(SelectionDAG &DAG, SDValue N, SDValue &Op, ConstantSDNode *COp0 = dyn_cast(Op0); ConstantSDNode *COp1 = dyn_cast(Op1); - if (COp0 && COp0->getZExtValue() == 0) + if (COp0 && COp0->isNullValue()) Op = Op1; - else if (COp1 && COp1->getZExtValue() == 0) + else if (COp1 && COp1->isNullValue()) Op = Op0; else return false; -- cgit v1.2.3-70-g09d2