forked from OSchip/llvm-project
Implement new Instruction::isRelational method
llvm-svn: 10810
This commit is contained in:
parent
bf007407c5
commit
dab8b6bb50
|
@ -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.
|
||||
///
|
||||
|
|
Loading…
Reference in New Issue