diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-03-29 12:37:26 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-03-29 12:37:26 +0000 |
commit | 73478404af7f6b6e64bdda5920ebaede6a4e7a14 (patch) | |
tree | 921d2d3106ea0c746dd3c38693ffd93bc50cbd0d /lib/Target/X86 | |
parent | b8ca98874316bfe8e46b27e7a034a8a764c92e08 (diff) | |
download | external_llvm-73478404af7f6b6e64bdda5920ebaede6a4e7a14.zip external_llvm-73478404af7f6b6e64bdda5920ebaede6a4e7a14.tar.gz external_llvm-73478404af7f6b6e64bdda5920ebaede6a4e7a14.tar.bz2 |
Replace assert(0) with llvm_unreachable to avoid warnings about dropping off the end of a non-void function in Release builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153643 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86')
-rw-r--r-- | lib/Target/X86/X86ISelDAGToDAG.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Target/X86/X86ISelDAGToDAG.cpp b/lib/Target/X86/X86ISelDAGToDAG.cpp index 03b7a12..36861a5 100644 --- a/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/lib/Target/X86/X86ISelDAGToDAG.cpp @@ -1908,23 +1908,22 @@ static bool isLoadIncOrDecStore(StoreSDNode *StoreNode, unsigned Opc, return true; } -/// getFusedLdStOpcode - Get the appropriate X86 opcode for an in memory -/// increment or decrement. Opc should be X86ISD::DEC or X86ISD:INC. +/// 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 { + } else { + assert(Opc == X86ISD::INC && "unrecognized opcode"); 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"); } + llvm_unreachable("unrecognized size for LdVT"); } SDNode *X86DAGToDAGISel::Select(SDNode *Node) { |