[PATCH] D127392: [AggressiveInstCombine] Combine consecutive loads which are being merged to form a wider load.
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 30 06:29:32 PDT 2022
nikic added inline comments.
Herald added a subscriber: pcwang-thead.
================
Comment at: llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp:519
+ // Check if loads are same, atomic, volatile and having same address space.
+ if (LI1 == LI2 || !LI1 || !LI2 || (!LI1->isSimple() && !LI2->isSimple()) ||
+ LI1->getPointerAddressSpace() != LI2->getPointerAddressSpace())
----------------
Shouldn't this be `!LI1->isSimple() || `!LI2->isSimple()`? We want to bail if either load isn't simple, not if both are.
Also, it looks like there are no (negative) tests for volatile/atomic loads.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127392/new/
https://reviews.llvm.org/D127392
More information about the llvm-commits
mailing list