<font><font face="tahoma,sans-serif">Hi;<br></font></font><br><div class="gmail_quote">On Thu, Mar 29, 2012 at 7:45 AM, Joel Jones <span dir="ltr"><<a href="mailto:joel_k_jones@apple.com">joel_k_jones@apple.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">+/// getFusedLdStOpcode - Get the appropriate X86 opcode for an in memory<br>
+/// increment or decrement. Opc should be X86ISD::DEC or X86ISD:INC.<br>
+static unsigned getFusedLdStOpcode(EVT &LdVT, unsigned Opc) {<br>
+  if (Opc == X86ISD::DEC) {<br>
+    if (LdVT == MVT::i64) return X86::DEC64m;<br>
+    if (LdVT == MVT::i32) return X86::DEC32m;<br>
+    if (LdVT == MVT::i16) return X86::DEC16m;<br>
+    if (LdVT == MVT::i8)  return X86::DEC8m;<br>
+    assert(0 && "unrecognized size for LdVT");<br>
+  }<br>
+  else {<br>
+    if (LdVT == MVT::i64) return X86::INC64m;<br>
+    if (LdVT == MVT::i32) return X86::INC32m;<br>
+    if (LdVT == MVT::i16) return X86::INC16m;<br>
+    if (LdVT == MVT::i8)  return X86::INC8m;<br>
+    assert(0 && "unrecognized size for LdVT");<br>
+  }<br></blockquote><div><br></div><div>This needs an llvm_unreachable I guess because gcc complains:</div><div><br></div>lib/Target/X86/X86ISelDAGToDAG.cpp: In function 'unsigned int getFusedLdStOpcode(llvm::EVT&, unsigned int)': </div>

<div class="gmail_quote">lib/Target/X86/X86ISelDAGToDAG.cpp:1928:1: warning: control reaches end of non-void function </div><div class="gmail_quote"><br></div><div class="gmail_quote">Regards,</div><div class="gmail_quote">

ismail</div><div class="gmail_quote"><br></div>