mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-11 08:29:25 +00:00
Add suppport for ConstantExprs of shufflevectors whose result type is not equal to the
type of the vectors being shuffled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64401 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -643,7 +643,16 @@ static void WriteConstants(unsigned FirstVal, unsigned LastVal,
|
||||
Record.push_back(VE.getValueID(C->getOperand(2)));
|
||||
break;
|
||||
case Instruction::ShuffleVector:
|
||||
Code = bitc::CST_CODE_CE_SHUFFLEVEC;
|
||||
// If the return type and argument types are the same, this is a
|
||||
// standard shufflevector instruction. If the types are different,
|
||||
// then the shuffle is widening or truncating the input vectors, and
|
||||
// the argument type must also be encoded.
|
||||
if (C->getType() == C->getOperand(0)->getType()) {
|
||||
Code = bitc::CST_CODE_CE_SHUFFLEVEC;
|
||||
} else {
|
||||
Code = bitc::CST_CODE_CE_SHUFVEC_EX;
|
||||
Record.push_back(VE.getTypeID(C->getOperand(0)->getType()));
|
||||
}
|
||||
Record.push_back(VE.getValueID(C->getOperand(0)));
|
||||
Record.push_back(VE.getValueID(C->getOperand(1)));
|
||||
Record.push_back(VE.getValueID(C->getOperand(2)));
|
||||
|
Reference in New Issue
Block a user