From: Reid Spencer Date: Mon, 26 Mar 2007 20:09:02 +0000 (+0000) Subject: Add a comment to explain a folding transform. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=4ada00d166b1d265fa4e751b63d7f869c7541f1b;p=oota-llvm.git 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 --- 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));