diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-03-26 20:09:02 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-03-26 20:09:02 +0000 |
commit | 4ada00d166b1d265fa4e751b63d7f869c7541f1b (patch) | |
tree | b1770e823d0c87b0dc8ec8563ed98470661faf67 /lib/VMCore/ConstantFold.cpp | |
parent | 21e289b5c23d4883063131eda800a953877d85b8 (diff) |
Add a comment to explain a folding transform.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35360 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/ConstantFold.cpp')
-rw-r--r-- | lib/VMCore/ConstantFold.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp index 46263060e5..ed69814383 100644 --- a/lib/VMCore/ConstantFold.cpp +++ b/lib/VMCore/ConstantFold.cpp @@ -554,6 +554,7 @@ Constant *llvm::ConstantFoldBinaryInstruction(unsigned Opcode, 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)); |