[llvm] 5a293d2 - [NFC][Alignment] Use getAlign in SelectionDAGBuilder
Guillaume Chatelet via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 13 08:17:37 PDT 2022
Author: Guillaume Chatelet
Date: 2022-06-13T15:13:05Z
New Revision: 5a293d21fc57c441f67f60c28dd15868c1e68030
URL: https://github.com/llvm/llvm-project/commit/5a293d21fc57c441f67f60c28dd15868c1e68030
DIFF: https://github.com/llvm/llvm-project/commit/5a293d21fc57c441f67f60c28dd15868c1e68030.diff
LOG: [NFC][Alignment] Use getAlign in SelectionDAGBuilder
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 392fe1623dd1e..49d8b1cfe1fd0 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -4671,7 +4671,7 @@ void SelectionDAGBuilder::visitAtomicLoad(const LoadInst &I) {
EVT MemVT = TLI.getMemValueType(DAG.getDataLayout(), I.getType());
if (!TLI.supportsUnalignedAtomics() &&
- I.getAlignment() < MemVT.getSizeInBits() / 8)
+ I.getAlign().value() < MemVT.getSizeInBits() / 8)
report_fatal_error("Cannot generate unaligned atomic load");
auto Flags = TLI.getLoadMemOperandFlags(I, DAG.getDataLayout());
@@ -4723,7 +4723,7 @@ void SelectionDAGBuilder::visitAtomicStore(const StoreInst &I) {
EVT MemVT =
TLI.getMemValueType(DAG.getDataLayout(), I.getValueOperand()->getType());
- if (I.getAlignment() < MemVT.getSizeInBits() / 8)
+ if (I.getAlign().value() < MemVT.getSizeInBits() / 8)
report_fatal_error("Cannot generate unaligned atomic store");
auto Flags = TLI.getStoreMemOperandFlags(I, DAG.getDataLayout());
More information about the llvm-commits
mailing list