[llvm] r236213 - Silence unused warning in non-assert builds.
Daniel Jasper
djasper at google.com
Thu Apr 30 02:01:21 PDT 2015
Author: djasper
Date: Thu Apr 30 04:01:21 2015
New Revision: 236213
URL: http://llvm.org/viewvc/llvm-project?rev=236213&view=rev
Log:
Silence unused warning in non-assert builds.
Modified:
llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=236213&r1=236212&r2=236213&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Thu Apr 30 04:01:21 2015
@@ -1344,8 +1344,9 @@ bool X86DAGToDAGISel::SelectVectorAddr(S
Scale = getI8Imm(ScalarSize/8, DL);
// If Base is 0, the whole address is in index and the Scale is 1
- if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Base)) {
- assert(C->isNullValue() && "Unexpected base in gather/scatter");
+ if (isa<ConstantSDNode>(Base)) {
+ assert(dyn_cast<ConstantSDNode>(Base)->isNullValue() &&
+ "Unexpected base in gather/scatter");
Scale = getI8Imm(1, DL);
Base = CurDAG->getRegister(0, MVT::i32);
}
More information about the llvm-commits
mailing list