mirror of
https://github.com/RPCSX/llvm.git
synced 2025-04-18 08:00:02 +00:00
Fix PR149 - support constant shift expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10167 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
95c03fd204
commit
0415b6c57a
@ -396,6 +396,8 @@ void CWriter::printConstant(Constant *CPV) {
|
|||||||
case Instruction::SetLE:
|
case Instruction::SetLE:
|
||||||
case Instruction::SetGT:
|
case Instruction::SetGT:
|
||||||
case Instruction::SetGE:
|
case Instruction::SetGE:
|
||||||
|
case Instruction::Shl:
|
||||||
|
case Instruction::Shr:
|
||||||
Out << "(";
|
Out << "(";
|
||||||
printConstant(CE->getOperand(0));
|
printConstant(CE->getOperand(0));
|
||||||
switch (CE->getOpcode()) {
|
switch (CE->getOpcode()) {
|
||||||
@ -410,6 +412,8 @@ void CWriter::printConstant(Constant *CPV) {
|
|||||||
case Instruction::SetLE: Out << " <= "; break;
|
case Instruction::SetLE: Out << " <= "; break;
|
||||||
case Instruction::SetGT: Out << " > "; break;
|
case Instruction::SetGT: Out << " > "; break;
|
||||||
case Instruction::SetGE: Out << " >= "; break;
|
case Instruction::SetGE: Out << " >= "; break;
|
||||||
|
case Instruction::Shl: Out << " << "; break;
|
||||||
|
case Instruction::Shr: Out << " >> "; break;
|
||||||
default: assert(0 && "Illegal opcode here!");
|
default: assert(0 && "Illegal opcode here!");
|
||||||
}
|
}
|
||||||
printConstant(CE->getOperand(1));
|
printConstant(CE->getOperand(1));
|
||||||
|
@ -396,6 +396,8 @@ void CWriter::printConstant(Constant *CPV) {
|
|||||||
case Instruction::SetLE:
|
case Instruction::SetLE:
|
||||||
case Instruction::SetGT:
|
case Instruction::SetGT:
|
||||||
case Instruction::SetGE:
|
case Instruction::SetGE:
|
||||||
|
case Instruction::Shl:
|
||||||
|
case Instruction::Shr:
|
||||||
Out << "(";
|
Out << "(";
|
||||||
printConstant(CE->getOperand(0));
|
printConstant(CE->getOperand(0));
|
||||||
switch (CE->getOpcode()) {
|
switch (CE->getOpcode()) {
|
||||||
@ -410,6 +412,8 @@ void CWriter::printConstant(Constant *CPV) {
|
|||||||
case Instruction::SetLE: Out << " <= "; break;
|
case Instruction::SetLE: Out << " <= "; break;
|
||||||
case Instruction::SetGT: Out << " > "; break;
|
case Instruction::SetGT: Out << " > "; break;
|
||||||
case Instruction::SetGE: Out << " >= "; break;
|
case Instruction::SetGE: Out << " >= "; break;
|
||||||
|
case Instruction::Shl: Out << " << "; break;
|
||||||
|
case Instruction::Shr: Out << " >> "; break;
|
||||||
default: assert(0 && "Illegal opcode here!");
|
default: assert(0 && "Illegal opcode here!");
|
||||||
}
|
}
|
||||||
printConstant(CE->getOperand(1));
|
printConstant(CE->getOperand(1));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user