[PATCH] D45198: [GlobalOpt] Fix support for casts in ctors.
Eugene Leviant via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 4 00:54:46 PDT 2018
evgeny777 added inline comments.
================
Comment at: lib/Transforms/Utils/Evaluator.cpp:208
+ Constant *Orig = nullptr;
+ auto MM = MutatedMemory.find(Val);
+ if (MM != MutatedMemory.end())
----------------
It looks like we can get into the same trouble when evaluating GEP as well. So probably move this to getInitializer() ?
================
Comment at: test/Transforms/GlobalOpt/static-const-bitcast.ll:1
+; RUN: opt -globalopt %s -S -o - | FileCheck %s
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
----------------
Can you make it a bit shorter? For instance clang generated metadata is not need for test case.
Repository:
rL LLVM
https://reviews.llvm.org/D45198
More information about the llvm-commits
mailing list