From 4ada00d166b1d265fa4e751b63d7f869c7541f1b Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Mon, 26 Mar 2007 20:09:02 +0000 Subject: [PATCH] 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 --- lib/VMCore/ConstantFold.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp index 46263060e57..ed69814383d 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(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(C1), const_cast(C2));