[NFC][Alignment] Use getAlign in DXILBitcodeWriter

This commit is contained in:
Guillaume Chatelet 2022-06-13 13:34:23 +00:00
parent 01a8b89edb
commit 93082108b7
1 changed files with 2 additions and 2 deletions

View File

@ -2461,7 +2461,7 @@ void DXILBitcodeWriter::writeInstruction(const Instruction &I, unsigned InstID,
AbbrevToUse = (unsigned)FUNCTION_INST_LOAD_ABBREV;
}
Vals.push_back(getTypeID(I.getType()));
Vals.push_back(Log2_32(cast<LoadInst>(I).getAlignment()) + 1);
Vals.push_back(Log2(cast<LoadInst>(I).getAlign()) + 1);
Vals.push_back(cast<LoadInst>(I).isVolatile());
if (cast<LoadInst>(I).isAtomic()) {
Vals.push_back(getEncodedOrdering(cast<LoadInst>(I).getOrdering()));
@ -2475,7 +2475,7 @@ void DXILBitcodeWriter::writeInstruction(const Instruction &I, unsigned InstID,
Code = bitc::FUNC_CODE_INST_STORE;
pushValueAndType(I.getOperand(1), InstID, Vals); // ptrty + ptr
pushValueAndType(I.getOperand(0), InstID, Vals); // valty + val
Vals.push_back(Log2_32(cast<StoreInst>(I).getAlignment()) + 1);
Vals.push_back(Log2(cast<StoreInst>(I).getAlign()) + 1);
Vals.push_back(cast<StoreInst>(I).isVolatile());
if (cast<StoreInst>(I).isAtomic()) {
Vals.push_back(getEncodedOrdering(cast<StoreInst>(I).getOrdering()));