[llvm-commits] [llvm] r153635 - in /llvm/trunk: lib/Target/X86/X86ISelDAGToDAG.cpp test/CodeGen/X86/dec-eflags-lower.ll test/CodeGen/X86/rd-mod-wr-eflags.ll

Benjamin Kramer benny.kra at googlemail.com
Thu Mar 29 05:55:54 PDT 2012


On 29.03.2012, at 14:33, İsmail Dönmez wrote:

> Hi;
> 
> On Thu, Mar 29, 2012 at 7:45 AM, Joel Jones <joel_k_jones at apple.com> wrote:
> +/// getFusedLdStOpcode - Get the appropriate X86 opcode for an in memory
> +/// increment or decrement. Opc should be X86ISD::DEC or X86ISD:INC.
> +static unsigned getFusedLdStOpcode(EVT &LdVT, unsigned Opc) {
> +  if (Opc == X86ISD::DEC) {
> +    if (LdVT == MVT::i64) return X86::DEC64m;
> +    if (LdVT == MVT::i32) return X86::DEC32m;
> +    if (LdVT == MVT::i16) return X86::DEC16m;
> +    if (LdVT == MVT::i8)  return X86::DEC8m;
> +    assert(0 && "unrecognized size for LdVT");
> +  }
> +  else {
> +    if (LdVT == MVT::i64) return X86::INC64m;
> +    if (LdVT == MVT::i32) return X86::INC32m;
> +    if (LdVT == MVT::i16) return X86::INC16m;
> +    if (LdVT == MVT::i8)  return X86::INC8m;
> +    assert(0 && "unrecognized size for LdVT");
> +  }
> 
> This needs an llvm_unreachable I guess because gcc complains:
> 
> lib/Target/X86/X86ISelDAGToDAG.cpp: In function 'unsigned int getFusedLdStOpcode(llvm::EVT&, unsigned int)': 
> lib/Target/X86/X86ISelDAGToDAG.cpp:1928:1: warning: control reaches end of non-void function 

Fixed (with a few cosmetic changes) in r153643.

- Ben

> Regards,
> ismail
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list