diff options
author | Kazu Hirata <kazu@google.com> | 2023-02-15 22:17:27 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2023-02-15 22:17:27 -0800 |
commit | 7e6e636fb683a854de27f56b2da7d157a0b70f4e (patch) | |
tree | 22aa13d1a9f871072ed46b3ba62a4b5a6e9f70d2 /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
parent | 68e81d7e45c7ea1e2427bf6ac12ac5702693d5e9 (diff) | |
download | llvm-7e6e636fb683a854de27f56b2da7d157a0b70f4e.zip llvm-7e6e636fb683a854de27f56b2da7d157a0b70f4e.tar.gz llvm-7e6e636fb683a854de27f56b2da7d157a0b70f4e.tar.bz2 |
Use llvm::has_single_bit<uint32_t> (NFC)
This patch replaces isPowerOf2_32 with llvm::has_single_bit<uint32_t>
where the argument is wider than uint32_t.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index de8d058..1ff8840 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -1626,7 +1626,7 @@ unsigned TargetLoweringBase::getVectorTypeBreakdown(LLVMContext &Context, if (EVT(DestVT).bitsLT(NewVT)) { // Value is expanded, e.g. i64 -> i16. TypeSize NewVTSize = NewVT.getSizeInBits(); // Convert sizes such as i33 to i64. - if (!isPowerOf2_32(NewVTSize.getKnownMinValue())) + if (!llvm::has_single_bit<uint32_t>(NewVTSize.getKnownMinValue())) NewVTSize = NewVTSize.coefficientNextPowerOf2(); return NumVectorRegs*(NewVTSize/DestVT.getSizeInBits()); } |