[PATCH] D82779: [Alignment][NFC] Migrate PPC, X86 and XCore backends to Align
Guillaume Chatelet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 29 09:10:35 PDT 2020
gchatelet marked 4 inline comments as done.
gchatelet added inline comments.
Herald added a subscriber: wuzish.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1403
} else if (ArrayType *ATy = dyn_cast<ArrayType>(Ty)) {
- unsigned EltAlign = 0;
+ Align EltAlign;
getMaxByValAlign(ATy->getElementType(), EltAlign, MaxMaxAlign);
----------------
This may seem like not NFC but it is.
This is because `MaxAlign>=1` by definition and so it doesn't matter if `EltAlign` is `0` or `1` originally for the statement below:
```
if (EltAlign > MaxAlign)
MaxAlign = EltAlign;
```
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1409
for (auto *EltTy : STy->elements()) {
- unsigned EltAlign = 0;
+ Align EltAlign;
getMaxByValAlign(EltTy, EltAlign, MaxMaxAlign);
----------------
ditto
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:2197
} else if (ArrayType *ATy = dyn_cast<ArrayType>(Ty)) {
- unsigned EltAlign = 0;
+ Align EltAlign;
getMaxByValAlign(ATy->getElementType(), EltAlign);
----------------
ditto
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:2203
for (auto *EltTy : STy->elements()) {
- unsigned EltAlign = 0;
+ Align EltAlign;
getMaxByValAlign(EltTy, EltAlign);
----------------
ditto
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82779/new/
https://reviews.llvm.org/D82779
More information about the llvm-commits
mailing list