Use cast<> instead of dyn_cast to remove llvm_unreachable. NFC.
authorPete Cooper <peter_cooper@apple.com>
Wed, 15 Jul 2015 01:31:23 +0000 (01:31 +0000)
committerPete Cooper <peter_cooper@apple.com>
Wed, 15 Jul 2015 01:31:23 +0000 (01:31 +0000)
commitbabb387919eb977259c9801f56b798bcb4436cd9
tree24360d4ae4ab2558993a2340e96a55fea27602d5
parent483db5542fd88853602cf34af0793dd76f50780b
Use cast<> instead of dyn_cast to remove llvm_unreachable.  NFC.

This code was checking if we are an ICmpInst or FCmpInst then throwing
unreachable if we are neither.  We must be one or the other, so use a
cast on the FCmpInst case to ensure that we are that case.  Then we can
avoid having an unreachable but still catch an error if we ever had another
subclass of CmpInst.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242264 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp