[llvm] 54048ce - [SystemZ] Use llvm::bit_floor (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 28 15:04:27 PST 2023
Author: Kazu Hirata
Date: 2023-01-28T15:04:16-08:00
New Revision: 54048ce86346fa612ab0dc3aceae111290ae6076
URL: https://github.com/llvm/llvm-project/commit/54048ce86346fa612ab0dc3aceae111290ae6076
DIFF: https://github.com/llvm/llvm-project/commit/54048ce86346fa612ab0dc3aceae111290ae6076.diff
LOG: [SystemZ] Use llvm::bit_floor (NFC)
Added:
Modified:
llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
index c83c0d80fbc6..7ad52422a3c4 100644
--- a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
@@ -2535,8 +2535,7 @@ static unsigned getTestUnderMaskCond(unsigned BitSize, unsigned CCMask,
return 0;
// Work out the masks for the lowest and highest bits.
- unsigned HighShift = 63 - llvm::countl_zero(Mask);
- uint64_t High = uint64_t(1) << HighShift;
+ uint64_t High = llvm::bit_floor(Mask);
uint64_t Low = uint64_t(1) << llvm::countr_zero(Mask);
// Signed ordered comparisons are effectively unsigned if the sign
More information about the llvm-commits
mailing list