aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-07-20 18:49:33 +0000
committerChris Lattner <sabre@nondot.org>2010-07-20 18:49:33 +0000
commit6ba9aaed5eb612402d69117a0b63351272b4ae2e (patch)
treee5ac6ae833fef8f478c6e52a908ee878c0157208 /lib/Sema/SemaChecking.cpp
parentdefe8b263aebd0dfdbe15478ad7bd832b4345ac9 (diff)
delete a loop that just generates dead code. In an example
like this: void *test(long N) { return new int[N][42][42]; } the loop generates two dead mul instructions: %tmp = load i64* %N.addr ; <i64> [#uses=2] %0 = mul i64 %tmp, 7056 ; <i64> [#uses=1] %1 = mul i64 %tmp, 42 ; <i64> [#uses=1] %2 = mul i64 %1, 42 ; <i64> [#uses=0] %call = call noalias i8* @_Znam(i64 %0) ; <i8*> [#uses=1] The scale of these multiplies is already handled by the typesize stuff. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108884 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
0 files changed, 0 insertions, 0 deletions