<div class="gmail_extra"><div class="gmail_quote">On Mon, Aug 27, 2012 at 2:35 PM, Benjamin Kramer <span dir="ltr"><<a href="mailto:benny.kra@googlemail.com" target="_blank">benny.kra@googlemail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: d0k<br>
Date: Mon Aug 27 16:35:58 2012<br>
New Revision: 162701<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=162701&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=162701&view=rev</a><br>
Log:<br>
CodeGen: When emitting stores for an initializer, only emit a GEP if we really need the store.<br>
<br>
This avoids emitting many dead GEPs for large zero-initialized arrays.<br></blockquote><div><br></div><div>A point of clarity for those playing along but not on IRC:</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Modified: cfe/trunk/test/CodeGen/init.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/init.c?rev=162701&r1=162700&r2=162701&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/init.c?rev=162701&r1=162700&r2=162701&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CodeGen/init.c (original)<br>
+++ cfe/trunk/test/CodeGen/init.c Mon Aug 27 16:35:58 2012<br>
@@ -69,6 +69,8 @@<br>
// CHECK: store i8 97<br>
// CHECK: store i8 98<br>
// CHECK: store i8 99<br>
+// CHECK-NOT: getelementptr<br>
+// CHECK: load<br></blockquote><div><br></div><div>Previously this test case produced 100k dead GEPs here. Yes.</div></div></div>