diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-04-10 00:16:22 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-04-10 00:16:22 +0000 |
| commit | 1d9672bdce801aa2674bb3c572f3eac660bd7a49 (patch) | |
| tree | 22db8e2dbea4250d46232d5faa843cebeda0b1a4 /llvm/lib/CodeGen | |
| parent | fc1562dbca6ac8cd330df3d0e407100d240ea877 (diff) | |
| download | bcm5719-llvm-1d9672bdce801aa2674bb3c572f3eac660bd7a49.tar.gz bcm5719-llvm-1d9672bdce801aa2674bb3c572f3eac660bd7a49.zip | |
Don't try to zExt just to check if an integer constant is zero, it might
not fit in a i64.
llvm-svn: 154364
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index dbc1ca909a2..cf7ce587f36 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -4431,9 +4431,9 @@ static bool isTruncateOf(SelectionDAG &DAG, SDValue N, SDValue &Op, ConstantSDNode *COp0 = dyn_cast<ConstantSDNode>(Op0); ConstantSDNode *COp1 = dyn_cast<ConstantSDNode>(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; |

