summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2015-06-08 16:19:00 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2015-06-08 16:19:00 +0000
commit4791f6d89b01860d68e861522fb68bac6d29a149 (patch)
tree54d079f82a8cb078a8798077d204221a54b5b6ec /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parent59902c229f5146875fc229057e8dae4cee327f97 (diff)
downloadbcm5719-llvm-4791f6d89b01860d68e861522fb68bac6d29a149.tar.gz
bcm5719-llvm-4791f6d89b01860d68e861522fb68bac6d29a149.zip
[DAGCombiner] Added CTLZ vector constant folding support.
llvm-svn: 239305
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 4b9167723f4..a71c6761c75 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -4769,7 +4769,7 @@ SDValue DAGCombiner::visitCTLZ(SDNode *N) {
EVT VT = N->getValueType(0);
// fold (ctlz c1) -> c2
- if (isa<ConstantSDNode>(N0))
+ if (isConstantIntBuildVectorOrConstantInt(N0))
return DAG.getNode(ISD::CTLZ, SDLoc(N), VT, N0);
return SDValue();
}
@@ -4779,7 +4779,7 @@ SDValue DAGCombiner::visitCTLZ_ZERO_UNDEF(SDNode *N) {
EVT VT = N->getValueType(0);
// fold (ctlz_zero_undef c1) -> c2
- if (isa<ConstantSDNode>(N0))
+ if (isConstantIntBuildVectorOrConstantInt(N0))
return DAG.getNode(ISD::CTLZ_ZERO_UNDEF, SDLoc(N), VT, N0);
return SDValue();
}
OpenPOWER on IntegriCloud