[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

İsmail Dönmez ismail at namtrac.org
Thu Mar 29 05:33:08 PDT 2012


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

Regards,
ismail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120329/9f52e4d0/attachment.html>


More information about the llvm-commits mailing list