[PATCH] D144445: [AggressiveInstCombine] folding load for constant global patterened arrays and structs
Kohei Asano via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 6 01:37:21 PST 2023
khei4 added inline comments.
================
Comment at: llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp:904
+ if (LoadAlign > GV->getAlign().valueOrOne().value())
+ return false;
+ Constant *C = GV->getInitializer();
----------------
according to this alive results https://alive2.llvm.org/ce/z/5_EDLB
when load alignment is bigger, seems to be fine to return poison value
```
if (GV->getAlign().valueOrOne().value() < LoadAlign) {
I.replaceAllUsesWith(PoisonValue::get(LoadTy));
return true;
}
```
but the following test failed. (on `check-llvm` only targeted for X86)
`llvm/test/Transforms/PhaseOrdering/X86/nancvt.ll`
is this alive result wrong?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144445/new/
https://reviews.llvm.org/D144445
More information about the llvm-commits
mailing list