mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-20 14:29:27 +00:00
Add shufflevector support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27515 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
67f1351498
commit
9273b0403e
@ -317,6 +317,12 @@ static Value *RemapOperand(const Value *In,
|
|||||||
Result = ConstantExpr::getInsertElement(cast<Constant>(Ptr),
|
Result = ConstantExpr::getInsertElement(cast<Constant>(Ptr),
|
||||||
cast<Constant>(Elt),
|
cast<Constant>(Elt),
|
||||||
cast<Constant>(Idx));
|
cast<Constant>(Idx));
|
||||||
|
} else if (CE->getOpcode() == Instruction::ShuffleVector) {
|
||||||
|
Value *V1 = RemapOperand(CE->getOperand(0), ValueMap);
|
||||||
|
Value *V2 = RemapOperand(CE->getOperand(1), ValueMap);
|
||||||
|
Result = ConstantExpr::getShuffleVector(cast<Constant>(V1),
|
||||||
|
cast<Constant>(V2),
|
||||||
|
cast<Constant>(CE->getOperand(2)));
|
||||||
} else if (CE->getNumOperands() == 1) {
|
} else if (CE->getNumOperands() == 1) {
|
||||||
// Cast instruction
|
// Cast instruction
|
||||||
assert(CE->getOpcode() == Instruction::Cast);
|
assert(CE->getOpcode() == Instruction::Cast);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user