[llvm] dff32e3 - [NFC][Alignment] Use getAlign in SPIRVEmitIntrinsics
Guillaume Chatelet via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 13 08:17:39 PDT 2022
Author: Guillaume Chatelet
Date: 2022-06-13T15:13:05Z
New Revision: dff32e36f62b8ffca317c7a343efc6f5e77f547e
URL: https://github.com/llvm/llvm-project/commit/dff32e36f62b8ffca317c7a343efc6f5e77f547e
DIFF: https://github.com/llvm/llvm-project/commit/dff32e36f62b8ffca317c7a343efc6f5e77f547e.diff
LOG: [NFC][Alignment] Use getAlign in SPIRVEmitIntrinsics
Added:
Modified:
llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp b/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
index 4c5bad4f5683e..9624482e36221 100644
--- a/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
@@ -288,7 +288,7 @@ Instruction *SPIRVEmitIntrinsics::visitLoadInst(LoadInst &I) {
auto *NewI =
IRB->CreateIntrinsic(Intrinsic::spv_load, {I.getOperand(0)->getType()},
{I.getPointerOperand(), IRB->getInt16(Flags),
- IRB->getInt8(I.getAlignment())});
+ IRB->getInt8(I.getAlign().value())});
replaceMemInstrUses(&I, NewI);
return NewI;
}
@@ -304,7 +304,7 @@ Instruction *SPIRVEmitIntrinsics::visitStoreInst(StoreInst &I) {
auto *NewI =
IRB->CreateIntrinsic(Intrinsic::spv_store, {PtrOp->getType()},
{I.getValueOperand(), PtrOp, IRB->getInt16(Flags),
- IRB->getInt8(I.getAlignment())});
+ IRB->getInt8(I.getAlign().value())});
I.eraseFromParent();
return NewI;
}
More information about the llvm-commits
mailing list