[llvm-commits] CVS: llvm/lib/Transforms/Utils/Local.cpp SimplifyCFG.cpp

Reid Spencer reid at x10sys.com
Tue Nov 7 22:48:13 PST 2006



Changes in directory llvm/lib/Transforms/Utils:

Local.cpp updated: 1.59 -> 1.60
SimplifyCFG.cpp updated: 1.103 -> 1.104
---
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:  (+4 -2)

 Local.cpp       |    3 ++-
 SimplifyCFG.cpp |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)


Index: llvm/lib/Transforms/Utils/Local.cpp
diff -u llvm/lib/Transforms/Utils/Local.cpp:1.59 llvm/lib/Transforms/Utils/Local.cpp:1.60
--- llvm/lib/Transforms/Utils/Local.cpp:1.59	Fri Oct 20 02:07:24 2006
+++ llvm/lib/Transforms/Utils/Local.cpp	Wed Nov  8 00:47:33 2006
@@ -120,7 +120,8 @@
     }
     return 0;
   case Instruction::Shl:
-  case Instruction::Shr:
+  case Instruction::LShr:
+  case Instruction::AShr:
     return ConstantExpr::get(Opc, Ops[0], Ops[1]);
   case Instruction::Cast:
     return ConstantExpr::getCast(Ops[0], DestTy);


Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp
diff -u llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.103 llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.104
--- llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.103	Thu Nov  2 14:25:50 2006
+++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp	Wed Nov  8 00:47:33 2006
@@ -368,7 +368,8 @@
       case Instruction::Or:
       case Instruction::Xor:
       case Instruction::Shl:
-      case Instruction::Shr:
+      case Instruction::LShr:
+      case Instruction::AShr:
       case Instruction::SetEQ:
       case Instruction::SetNE:
       case Instruction::SetLT:






More information about the llvm-commits mailing list