<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>This is a code change to add support for changing instruction sequences of the form:<br><br></div><div>  load<br>  inc/dec of 8/16/32/64 bits<br>  store<br><br></div><div>into the appropriate X86 inc/dec through memory instruction:<br><br></div><div>  inc[qlwb] / dec[qlwb]<br><font class="Apple-style-span" color="#0965c6"><br></font>The change is in lib/Target/X86/X86ISelDAGToDAG.cpp, an svn diff of which is attached.<br><div>Also attached is a test case for test/CodeGen/X86. The checks that were in </div><div>X86DAGToDAGISel::Select(SDNode *Node)>>ISD::STORE have been extracted</div></div><div>to isLoadIncOrDecStore and reworked to use the better</div><div>named wrappers for getOperand(unsigned) and replaced Chain.getNode()</div><div>with LoadNode.  I have also expanded the comments.  </div><div><br></div><div>To address the reviewer's comments:</div><div><br></div><div>With the expanded comments,  I think the broken down checks are more appropriate; </div><div>q.v. <a href="http://llvm.org/docs/CodingStandards.html#hl_earlyexit">http://llvm.org/docs/CodingStandards.html#hl_earlyexit</a></div><div><br></div><div>I also prefer NOT/OR/== to AND/!= when all the left operands of the comparison operators </div><div>are the same, as I think it more clearly expresses the intent of "if the value being examined </div><div>isn't A or B, then do something"</div><div><br></div><div>Joel</div><div></div></body></html>