reapply r121100 with a tweak to constant fold ConstExprs with TargetData
authorChris Lattner <sabre@nondot.org>
Tue, 7 Dec 2010 04:33:29 +0000 (04:33 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 7 Dec 2010 04:33:29 +0000 (04:33 +0000)
commit1945d58025203aec7883c11ac51b827d440f6916
tree34aa088a52bb847fc44e2c062d0cda3accc84797
parentca3a339d767882ef726d898d29f06bc94568c701
reapply r121100 with a tweak to constant fold ConstExprs with TargetData
(if available) as we go so that we get simple constantexprs not insane ones.
This fixes the failure of clang/test/CodeGenCXX/virtual-base-ctor.cpp
that the previous iteration of this patch had.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121111 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/GlobalOpt.cpp
test/Transforms/GlobalOpt/ctor-list-opt-constexpr.ll [new file with mode: 0644]