On Mon, Aug 27, 2012 at 2:35 PM, Benjamin Kramer <[email protected]>wrote:
> Author: d0k > Date: Mon Aug 27 16:35:58 2012 > New Revision: 162701 > > URL: http://llvm.org/viewvc/llvm-project?rev=162701&view=rev > Log: > CodeGen: When emitting stores for an initializer, only emit a GEP if we > really need the store. > > This avoids emitting many dead GEPs for large zero-initialized arrays. > A point of clarity for those playing along but not on IRC: > Modified: cfe/trunk/test/CodeGen/init.c > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/init.c?rev=162701&r1=162700&r2=162701&view=diff > > ============================================================================== > --- cfe/trunk/test/CodeGen/init.c (original) > +++ cfe/trunk/test/CodeGen/init.c Mon Aug 27 16:35:58 2012 > @@ -69,6 +69,8 @@ > // CHECK: store i8 97 > // CHECK: store i8 98 > // CHECK: store i8 99 > +// CHECK-NOT: getelementptr > +// CHECK: load > Previously this test case produced 100k dead GEPs here. Yes.
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
