From: Bill Wendling Date: Wed, 3 Dec 2008 08:32:02 +0000 (+0000) Subject: CC should only be a ConstantSDNode at this point. Just use 'cast' instead of 'dyn_cast'. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=0ea25cb9413ec60d6f844cf427c99c721062085f;p=oota-llvm.git CC should only be a ConstantSDNode at this point. Just use 'cast' instead of 'dyn_cast'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60477 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index a74d328e203..b98792454f2 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -5202,15 +5202,15 @@ SDValue X86TargetLowering::LowerBRCOND(SDValue Op, SelectionDAG &DAG) { Cond = Cmp; addTest = false; } else { - if (ConstantSDNode *CSDN = dyn_cast(CC.getNode())) { - switch (CSDN->getZExtValue()) { - default: break; - case X86::COND_O: - case X86::COND_C: - Cond = Cond.getNode()->getOperand(1); - addTest = false; - break; - } + ConstantSDNode *CSDN = cast(CC.getNode()); + + switch (CSDN->getZExtValue()) { + default: break; + case X86::COND_O: + case X86::COND_C: + Cond = Cond.getNode()->getOperand(1); + addTest = false; + break; } } // Also, recognize the pattern generated by an FCMP_UNE. We can emit