Use predicate for Value type test


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@540 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/InstrSched/SchedGraph.cpp b/lib/CodeGen/InstrSched/SchedGraph.cpp
index dc0916a..05109cb 100644
--- a/lib/CodeGen/InstrSched/SchedGraph.cpp
+++ b/lib/CodeGen/InstrSched/SchedGraph.cpp
@@ -482,8 +482,7 @@
 		       Value* val,
 		       const TargetMachine& target)
 {
-  if (val->getValueType() != Value::InstructionVal)
-    return;
+  if (!val->isInstruction()) return;
 
   const Instruction* thisVMInstr = node->getInstr();
   const Instruction* defVMInstr  = (const Instruction*) val;