[NFC][Alignment] Simplify code in JSONExporter
authorGuillaume Chatelet <gchatelet@google.com>
Mon, 13 Jun 2022 13:35:47 +0000 (13:35 +0000)
committerGuillaume Chatelet <gchatelet@google.com>
Mon, 13 Jun 2022 13:36:36 +0000 (13:36 +0000)
polly/lib/Exchange/JSONExporter.cpp

index 3bb2a9a..57c997e 100644 (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) {