[GlobalOpt] Enable evaluation of atomic loads
authorAlexander Shaposhnikov <ashaposhnikov@google.com>
Thu, 21 Jul 2022 21:29:39 +0000 (21:29 +0000)
committerAlexander Shaposhnikov <ashaposhnikov@google.com>
Thu, 21 Jul 2022 21:36:11 +0000 (21:36 +0000)
commite9afdf838eb9bb0914f58c762b676aa31b9d41d1
tree2e006acdbcd0bf41f0a7f656c6ed25286ed9f976
parent674cab116dd56a7e5af7df438c6ac12d081c0b77
[GlobalOpt] Enable evaluation of atomic loads

Relax the check to allow evaluation of atomic loads
(but still skip volatile loads).

Test plan:
1/ ninja check-llvm check-clang
2/ Bootstrapped LLVM/Clang pass tests

Differential revision: https://reviews.llvm.org/D130211
llvm/lib/Transforms/Utils/Evaluator.cpp
llvm/test/Transforms/GlobalOpt/ctor-list-opt.ll