summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2017-01-16 14:49:26 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2017-01-16 14:49:26 +0000
commit3e91519a1c21ac9343483ff2a3294ee2f5cd7142 (patch)
treedbe8fb11bdffb131513cf4ee26fbfb8e40648b36 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parent7630b8c5ee3109986a013b71f7b9352b23101aad (diff)
downloadbcm5719-llvm-3e91519a1c21ac9343483ff2a3294ee2f5cd7142.tar.gz
bcm5719-llvm-3e91519a1c21ac9343483ff2a3294ee2f5cd7142.zip
[SelectionDAG] Add knownbits support for BITREVERSE
llvm-svn: 292130
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 6b2123f1940..24aed22e228 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -2673,6 +2673,13 @@ void SelectionDAG::computeKnownBits(SDValue Op, APInt &KnownZero,
}
break;
}
+ case ISD::BITREVERSE: {
+ computeKnownBits(Op.getOperand(0), KnownZero2, KnownOne2, DemandedElts,
+ Depth + 1);
+ KnownZero = KnownZero2.reverseBits();
+ KnownOne = KnownOne2.reverseBits();
+ break;
+ }
case ISD::BSWAP: {
computeKnownBits(Op.getOperand(0), KnownZero2, KnownOne2, DemandedElts,
Depth + 1);
OpenPOWER on IntegriCloud