mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
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
This commit is contained in:
parent
21e289b5c2
commit
4ada00d166
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user