[PATCH] D45198: [GlobalOpt] Fix support for casts in ctors.
Mircea Trofin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 5 21:28:53 PDT 2018
mtrofin marked an inline comment as done.
mtrofin added inline comments.
================
Comment at: lib/Transforms/Utils/Evaluator.cpp:208
+ Constant *Orig = nullptr;
+ auto MM = MutatedMemory.find(Val);
+ if (MM != MutatedMemory.end())
----------------
evgeny777 wrote:
> It looks like we can get into the same trouble when evaluating GEP as well. So probably move this to getInitializer() ?
That's what I thought, too, but I'm having trouble producing a testcase. Replacing the bitcast here with a GEP (and performing the necessary adjustments) "just works".
Repository:
rL LLVM
https://reviews.llvm.org/D45198
More information about the llvm-commits
mailing list