diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2015-06-08 09:57:09 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2015-06-08 09:57:09 +0000 |
commit | c789e1d57bb9e4513dc212d1558e4c49bc88f8f5 (patch) | |
tree | e26f0bb65a7e2d1b75f565fb4aa04dc61e4d02da /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | |
parent | f533d3e09d389ff99219914c4210ad6dc88dd178 (diff) | |
download | bcm5719-llvm-c789e1d57bb9e4513dc212d1558e4c49bc88f8f5.tar.gz bcm5719-llvm-c789e1d57bb9e4513dc212d1558e4c49bc88f8f5.zip |
[DAGCombiner] Added CTTZ vector constant folding support.
llvm-svn: 239293
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-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 307bfa502b7..4b9167723f4 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -4789,7 +4789,7 @@ SDValue DAGCombiner::visitCTTZ(SDNode *N) { EVT VT = N->getValueType(0); // fold (cttz c1) -> c2 - if (isa<ConstantSDNode>(N0)) + if (isConstantIntBuildVectorOrConstantInt(N0)) return DAG.getNode(ISD::CTTZ, SDLoc(N), VT, N0); return SDValue(); } @@ -4799,7 +4799,7 @@ SDValue DAGCombiner::visitCTTZ_ZERO_UNDEF(SDNode *N) { EVT VT = N->getValueType(0); // fold (cttz_zero_undef c1) -> c2 - if (isa<ConstantSDNode>(N0)) + if (isConstantIntBuildVectorOrConstantInt(N0)) return DAG.getNode(ISD::CTTZ_ZERO_UNDEF, SDLoc(N), VT, N0); return SDValue(); } |