[llvm-commits] CVS: llvm/lib/VMCore/ConstantFold.cpp

Reid Spencer reid at x10sys.com
Mon Mar 26 13:09:19 PDT 2007



Changes in directory llvm/lib/VMCore:

ConstantFold.cpp updated: 1.149 -> 1.150
---
Log message:

Add a comment to explain a folding transform.


---
Diffs of the changes:  (+1 -0)

 ConstantFold.cpp |    1 +
 1 files changed, 1 insertion(+)


Index: llvm/lib/VMCore/ConstantFold.cpp
diff -u llvm/lib/VMCore/ConstantFold.cpp:1.149 llvm/lib/VMCore/ConstantFold.cpp:1.150
--- llvm/lib/VMCore/ConstantFold.cpp:1.149	Sun Mar 25 00:47:04 2007
+++ llvm/lib/VMCore/ConstantFold.cpp	Mon Mar 26 15:09:02 2007
@@ -554,6 +554,7 @@
         if (C2->isNullValue()) return const_cast<Constant*>(C1);  // X ^ 0 == X
         break;
       case Instruction::AShr:
+        // ashr (zext C to Ty), C2 -> lshr (zext C, CSA), C2
         if (CE1->getOpcode() == Instruction::ZExt)  // Top bits known zero.
           return ConstantExpr::getLShr(const_cast<Constant*>(C1),
                                        const_cast<Constant*>(C2));






More information about the llvm-commits mailing list