Skip to content

Commit 00aabfa

Browse files
bokrzesiigcbot
authored andcommitted
[LLVM16] [LITS] Fixing LIT test: IntDivConstantReduction/basic.ll
Porting IGC code to LLVM16 * Fixing LIT test IntDivConstantReduction/basic.ll basing on https://reviews.llvm.org/D140924
1 parent fbcc75b commit 00aabfa

File tree

1 file changed

+4
-1
lines changed
  • IGC/WrapperLLVM/include/llvmWrapper/ADT

1 file changed

+4
-1
lines changed

IGC/WrapperLLVM/include/llvmWrapper/ADT/APInt.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ inline SignedDivisionByConstantInfo getAPIntMagic(const llvm::APInt &value) {
4040
}
4141

4242
inline UnsignedDivisionByConstantInfo getAPIntMagicUnsigned(const llvm::APInt &value, const unsigned LeadingZeros = 0) {
43-
#if LLVM_VERSION_MAJOR >= 14
43+
#if LLVM_VERSION_MAJOR >= 16
44+
// Basing on this: [https://reviews.llvm.org/D140924]
45+
return UnsignedDivisionByConstantInfo::get(value, LeadingZeros, false);
46+
#elif LLVM_VERSION_MAJOR >= 14
4447
return UnsignedDivisionByConstantInfo::get(value, LeadingZeros);
4548
#else
4649
return value.magicu(LeadingZeros);

0 commit comments

Comments
 (0)