[llvm] 4579a02 - [NFC] Fix warning in asserts build
Chris Bieneman via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 19 10:48:34 PDT 2022
Author: Chris Bieneman
Date: 2022-08-19T17:48:22-05:00
New Revision: 4579a0224cdcff01b2709501cb5b5d853a471542
URL: https://github.com/llvm/llvm-project/commit/4579a0224cdcff01b2709501cb5b5d853a471542
DIFF: https://github.com/llvm/llvm-project/commit/4579a0224cdcff01b2709501cb5b5d853a471542.diff
LOG: [NFC] Fix warning in asserts build
When asserts are enabled a warning for implicit conversion from 64-bit to
32-bit integer occurs here.
Added:
Modified:
llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp b/llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp
index f95d3a26a2eed..42f449ff66039 100644
--- a/llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp
+++ b/llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp
@@ -2451,7 +2451,7 @@ void DXILBitcodeWriter::writeInstruction(const Instruction &I, unsigned InstID,
Vals.push_back(getTypeID(I.getOperand(0)->getType()));
Vals.push_back(VE.getValueID(I.getOperand(0))); // size.
unsigned AlignRecord = Log2_32(AI.getAlign().value()) + 1;
- assert(Log2_32(Value::MaximumAlignment) + 1 < 1 << 5 &&
+ assert(Log2_64(Value::MaximumAlignment) + 1 < 1 << 5 &&
"not enough bits for maximum alignment");
assert(AlignRecord < 1 << 5 && "alignment greater than 1 << 64");
AlignRecord |= AI.isUsedWithInAlloca() << 5;
More information about the llvm-commits
mailing list