mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-25 15:41:05 +00:00
[IR] Use isIntOrIntVectorTy instead of writing it out the long way. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306250 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
37582000a6
commit
0b2cfb74b6
@ -2038,8 +2038,7 @@ void BinaryOperator::init(BinaryOps iType) {
|
||||
case SDiv:
|
||||
assert(getType() == LHS->getType() &&
|
||||
"Arithmetic operation should return same type as operands!");
|
||||
assert((getType()->isIntegerTy() || (getType()->isVectorTy() &&
|
||||
cast<VectorType>(getType())->getElementType()->isIntegerTy())) &&
|
||||
assert(getType()->isIntOrIntVectorTy() &&
|
||||
"Incorrect operand type (not integer) for S/UDIV");
|
||||
break;
|
||||
case FDiv:
|
||||
@ -2052,8 +2051,7 @@ void BinaryOperator::init(BinaryOps iType) {
|
||||
case SRem:
|
||||
assert(getType() == LHS->getType() &&
|
||||
"Arithmetic operation should return same type as operands!");
|
||||
assert((getType()->isIntegerTy() || (getType()->isVectorTy() &&
|
||||
cast<VectorType>(getType())->getElementType()->isIntegerTy())) &&
|
||||
assert(getType()->isIntOrIntVectorTy() &&
|
||||
"Incorrect operand type (not integer) for S/UREM");
|
||||
break;
|
||||
case FRem:
|
||||
@ -2067,18 +2065,14 @@ void BinaryOperator::init(BinaryOps iType) {
|
||||
case AShr:
|
||||
assert(getType() == LHS->getType() &&
|
||||
"Shift operation should return same type as operands!");
|
||||
assert((getType()->isIntegerTy() ||
|
||||
(getType()->isVectorTy() &&
|
||||
cast<VectorType>(getType())->getElementType()->isIntegerTy())) &&
|
||||
assert(getType()->isIntOrIntVectorTy() &&
|
||||
"Tried to create a shift operation on a non-integral type!");
|
||||
break;
|
||||
case And: case Or:
|
||||
case Xor:
|
||||
assert(getType() == LHS->getType() &&
|
||||
"Logical operation should return same type as operands!");
|
||||
assert((getType()->isIntegerTy() ||
|
||||
(getType()->isVectorTy() &&
|
||||
cast<VectorType>(getType())->getElementType()->isIntegerTy())) &&
|
||||
assert(getType()->isIntOrIntVectorTy() &&
|
||||
"Tried to create a logical operation on a non-integral type!");
|
||||
break;
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user