[PATCH] D85837: [GlobalOpt] Fix incorrect Modified status
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 1 02:57:51 PDT 2020
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/GlobalOpt.cpp:2027
+ if (GS.Ordering == AtomicOrdering::NotAtomic) {
GV->setConstant(true);
+ Changed = true;
----------------
Can `GV` here be already a constant? If so, we should only set Changed if `!GV->isConstant()`. Or if it is always non-constant to start with, perhaps add an assert to make sure?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85837/new/
https://reviews.llvm.org/D85837
More information about the llvm-commits
mailing list