Skip to content

Conversation

@GeorgeWeb
Copy link

Convert the int64_t Mask to uint64_t for llvm::has_single_bit to compile.

Convert the int64_t Mask to uint64_t for llvm::has_single_bit to compile.
@llvmbot
Copy link
Member

llvmbot commented Sep 24, 2024

@llvm/pr-subscribers-backend-amdgpu

Author: Georgi Mirazchiyski (GeorgeWeb)

Changes

Convert the int64_t Mask to uint64_t for llvm::has_single_bit to compile.


Full diff: https://github.com/llvm/llvm-project/pull/109785.diff

1 Files Affected:

  • (modified) llvm/lib/Target/AMDGPU/SIInstrInfo.cpp (+1-1)
diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
index f5f367b2a4a7c6..9ad0b4c65e1d90 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -9793,7 +9793,7 @@ bool SIInstrInfo::optimizeCompareInstr(MachineInstr &CmpInstr, Register SrcReg,
 
     // A valid Mask is required to have a single bit set, hence a non-zero and
     // power-of-two value. This verifies that we will not do 64-bit shift below.
-    assert(llvm::has_single_bit(Mask) && "Invalid mask.");
+    assert(llvm::has_single_bit<uint64_t>(Mask) && "Invalid mask.");
     unsigned BitNo = llvm::countr_zero((uint64_t)Mask);
     if (IsSigned && BitNo == SrcSize - 1)
       return false;

@GeorgeWeb
Copy link
Author

GeorgeWeb commented Sep 24, 2024

Fixes build failures caused from 6cfe6a6. (see #108416 (comment))

@arsenm arsenm merged commit c30fa3c into llvm:main Sep 24, 2024
@jplehr
Copy link
Contributor

jplehr commented Sep 24, 2024

Thanks for fix! (at least for our bots)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants