Skip to content

Commit 09b7692

Browse files
[X86] Use llvm::bit_ceil (NFC)
The argument is known to be nonzero, so we can safely switch to llvm::bit_ceil.
1 parent 9a501eb commit 09b7692

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/X86/X86ISelDAGToDAG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4181,7 +4181,7 @@ bool X86DAGToDAGISel::tryShrinkShlLogicImm(SDNode *N) {
41814181
if (Opcode == ISD::AND) {
41824182
// Find the smallest zext this could possibly be.
41834183
unsigned ZExtWidth = Cst->getAPIntValue().getActiveBits();
4184-
ZExtWidth = PowerOf2Ceil(std::max(ZExtWidth, 8U));
4184+
ZExtWidth = llvm::bit_ceil(std::max(ZExtWidth, 8U));
41854185

41864186
// Figure out which bits need to be zero to achieve that mask.
41874187
APInt NeededMask = APInt::getLowBitsSet(NVT.getSizeInBits(),

0 commit comments

Comments
 (0)