aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Target/Alpha/AlphaISelPattern.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Target/Alpha/AlphaISelPattern.cpp b/lib/Target/Alpha/AlphaISelPattern.cpp
index 9b1619ffce..08e1898798 100644
--- a/lib/Target/Alpha/AlphaISelPattern.cpp
+++ b/lib/Target/Alpha/AlphaISelPattern.cpp
@@ -1833,9 +1833,8 @@ unsigned AlphaISel::SelectExpr(SDOperand N) {
//check if we can convert into a shift!
if ((CSD = dyn_cast<ConstantSDNode>(N.getOperand(1).Val)) &&
(int64_t)CSD->getSignExtended() != 0 &&
- ExactLog2(llabs(CSD->getSignExtended())) != 0)
- {
- unsigned k = ExactLog2(llabs(CSD->getSignExtended()));
+ isPowerOf2_64(llabs(CSD->getSignExtended()))) {
+ unsigned k = Log2_64(llabs(CSD->getSignExtended()));
Tmp1 = SelectExpr(N.getOperand(0));
if (k == 1)
Tmp2 = Tmp1;