1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00

[Hexagon] Pattern match a CTZ loop into a call to countTrailingZeros.

No functional change intended.

llvm-svn: 233192
This commit is contained in:
Benjamin Kramer 2015-03-25 15:36:57 +00:00
parent 6c5bd093e6
commit 2ed53cd9d5

View File

@ -1137,10 +1137,7 @@ SDNode *HexagonDAGToDAGISel::SelectBitOp(SDNode *N) {
return SelectCode(N);
// Get the bit position.
while (!(Val & 1)) {
Val >>= 1;
++bitpos;
}
bitpos = countTrailingZeros(uint64_t(Val));
} else {
// For fabs and fneg, it's always the 31st bit.
bitpos = 31;