[llvm-commits] CVS: llvm/tools/llvm2cpp/CppWriter.cpp
Reid Spencer
reid at x10sys.com
Tue Nov 7 22:48:13 PST 2006
Changes in directory llvm/tools/llvm2cpp:
CppWriter.cpp updated: 1.20 -> 1.21
---
Log message:
For PR950: http://llvm.org/PR950 :
This patch converts the old SHR instruction into two instructions,
AShr (Arithmetic) and LShr (Logical). The Shr instructions now are not
dependent on the sign of their operands.
---
Diffs of the changes: (+6 -3)
CppWriter.cpp | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
Index: llvm/tools/llvm2cpp/CppWriter.cpp
diff -u llvm/tools/llvm2cpp/CppWriter.cpp:1.20 llvm/tools/llvm2cpp/CppWriter.cpp:1.21
--- llvm/tools/llvm2cpp/CppWriter.cpp:1.20 Thu Nov 2 14:25:50 2006
+++ llvm/tools/llvm2cpp/CppWriter.cpp Wed Nov 8 00:47:33 2006
@@ -788,7 +788,8 @@
case Instruction::SetLT: Out << "getSetLT"; break;
case Instruction::SetGT: Out << "getSetGT"; break;
case Instruction::Shl: Out << "getShl"; break;
- case Instruction::Shr: Out << "getShr"; break;
+ case Instruction::LShr: Out << "getLShr"; break;
+ case Instruction::AShr: Out << "getAShr"; break;
case Instruction::Select: Out << "getSelect"; break;
case Instruction::ExtractElement: Out << "getExtractElement"; break;
case Instruction::InsertElement: Out << "getInsertElement"; break;
@@ -1034,7 +1035,8 @@
case Instruction::Or:
case Instruction::Xor:
case Instruction::Shl:
- case Instruction::Shr:{
+ case Instruction::LShr:
+ case Instruction::AShr:{
Out << "BinaryOperator* " << iName << " = BinaryOperator::create(";
switch (I->getOpcode()) {
case Instruction::Add: Out << "Instruction::Add"; break;
@@ -1050,7 +1052,8 @@
case Instruction::Or: Out << "Instruction::Or"; break;
case Instruction::Xor: Out << "Instruction::Xor"; break;
case Instruction::Shl: Out << "Instruction::Shl"; break;
- case Instruction::Shr: Out << "Instruction::Shr"; break;
+ case Instruction::LShr:Out << "Instruction::LShr"; break;
+ case Instruction::AShr:Out << "Instruction::AShr"; break;
default: Out << "Instruction::BadOpCode"; break;
}
Out << ", " << opNames[0] << ", " << opNames[1] << ", \"";
More information about the llvm-commits
mailing list