Add vector shifts to the IR, patch by Eli Friedman.

CodeGen & Clang work coming next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54161 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nate Begeman
2008-07-29 15:49:41 +00:00
parent 75cf9cc527
commit 5bc1ea0736
11 changed files with 361 additions and 319 deletions

View File

@@ -874,6 +874,7 @@ void LoadInst::setAlignment(unsigned Align) {
//===----------------------------------------------------------------------===//
void StoreInst::AssertOK() {
assert(getOperand(0) && getOperand(1) && "Both operands must be non-null!");
assert(isa<PointerType>(getOperand(1)->getType()) &&
"Ptr must have pointer type!");
assert(getOperand(0)->getType() ==
@@ -1535,8 +1536,10 @@ void BinaryOperator::init(BinaryOps iType) {
case AShr:
assert(getType() == LHS->getType() &&
"Shift operation should return same type as operands!");
assert(getType()->isInteger() &&
"Shift operation requires integer operands");
assert((getType()->isInteger() ||
(isa<VectorType>(getType()) &&
cast<VectorType>(getType())->getElementType()->isInteger())) &&
"Tried to create a shift operation on a non-integral type!");
break;
case And: case Or:
case Xor: