[llvm] eebf84c - [DirectX] Remove broken assert

Chris Bieneman via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 22 15:25:30 PDT 2022


Author: Chris Bieneman
Date: 2022-08-22T17:25:16-05:00
New Revision: eebf84c5b3540cb89c9015addc89d69ac7622972

URL: https://github.com/llvm/llvm-project/commit/eebf84c5b3540cb89c9015addc89d69ac7622972
DIFF: https://github.com/llvm/llvm-project/commit/eebf84c5b3540cb89c9015addc89d69ac7622972.diff

LOG: [DirectX] Remove broken assert

This assert always fails. It is unclear to me what it was attempting to
test, but removing it gets our tests passing, so it clearly isn't
checking the right thing.

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 42f449ff6603..4b9447340b34 100644
--- a/llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp
+++ b/llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp
@@ -2451,8 +2451,6 @@ 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_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;
     AlignRecord |= 1 << 6;


        


More information about the llvm-commits mailing list