mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Support vector casts in more places, fixing a variety of assertion
failures. To support this, add some utility functions to Type to help support vector/scalar-independent code. Change ConstantInt::get and ConstantFP::get to support vector types, and add an overload to ConstantInt::get that uses a static IntegerType type, for convenience. Introduce a new getConstant method for ScalarEvolution, to simplify common use cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73431 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -290,13 +290,13 @@ static bool isUsedOutsideLoop(Value *V, Loop *L) {
|
||||
|
||||
// Return V+1
|
||||
static Value *getPlusOne(Value *V, bool Sign, Instruction *InsertPt) {
|
||||
ConstantInt *One = ConstantInt::get(V->getType(), 1, Sign);
|
||||
Constant *One = ConstantInt::get(V->getType(), 1, Sign);
|
||||
return BinaryOperator::CreateAdd(V, One, "lsp", InsertPt);
|
||||
}
|
||||
|
||||
// Return V-1
|
||||
static Value *getMinusOne(Value *V, bool Sign, Instruction *InsertPt) {
|
||||
ConstantInt *One = ConstantInt::get(V->getType(), 1, Sign);
|
||||
Constant *One = ConstantInt::get(V->getType(), 1, Sign);
|
||||
return BinaryOperator::CreateSub(V, One, "lsp", InsertPt);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user