[NFC][Alignment] Simplify code in JSONExporter

This commit is contained in:
Guillaume Chatelet 2022-06-13 13:35:47 +00:00
parent 310e3279d5
commit 4296f91323
1 changed files with 3 additions and 5 deletions

View File

@ -451,14 +451,12 @@ importAccesses(Scop &S, const json::Object &JScop, const DataLayout &DL,
bool SpecialAlignment = true;
if (LoadInst *LoadI = dyn_cast<LoadInst>(MA->getAccessInstruction())) {
SpecialAlignment =
LoadI->getAlignment() &&
DL.getABITypeAlignment(LoadI->getType()) != LoadI->getAlignment();
DL.getABITypeAlign(LoadI->getType()) != LoadI->getAlign();
} else if (StoreInst *StoreI =
dyn_cast<StoreInst>(MA->getAccessInstruction())) {
SpecialAlignment =
StoreI->getAlignment() &&
DL.getABITypeAlignment(StoreI->getValueOperand()->getType()) !=
StoreI->getAlignment();
DL.getABITypeAlign(StoreI->getValueOperand()->getType()) !=
StoreI->getAlign();
}
if (SpecialAlignment) {