Implement new Instruction::isRelational method

llvm-svn: 10810
This commit is contained in:
Chris Lattner 2004-01-12 23:18:25 +00:00
parent bf007407c5
commit dab8b6bb50
1 changed files with 16 additions and 0 deletions

View File

@ -148,6 +148,22 @@ bool Instruction::isCommutative(unsigned op) {
}
}
/// isRelational - Return true if the instruction is a Set* instruction:
///
bool Instruction::isRelational(unsigned op) {
switch (op) {
case SetEQ:
case SetNE:
case SetLT:
case SetGT:
case SetLE:
case SetGE:
return true;
}
return false;
}
/// isTrappingInstruction - Return true if the instruction may trap.
///