mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Eliminate unnecessary uses of getZExtValue().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106279 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -5042,19 +5042,19 @@ SDValue PPCTargetLowering::PerformDAGCombine(SDNode *N,
|
||||
default: break;
|
||||
case PPCISD::SHL:
|
||||
if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(N->getOperand(0))) {
|
||||
if (C->getZExtValue() == 0) // 0 << V -> 0.
|
||||
if (C->isNullValue()) // 0 << V -> 0.
|
||||
return N->getOperand(0);
|
||||
}
|
||||
break;
|
||||
case PPCISD::SRL:
|
||||
if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(N->getOperand(0))) {
|
||||
if (C->getZExtValue() == 0) // 0 >>u V -> 0.
|
||||
if (C->isNullValue()) // 0 >>u V -> 0.
|
||||
return N->getOperand(0);
|
||||
}
|
||||
break;
|
||||
case PPCISD::SRA:
|
||||
if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(N->getOperand(0))) {
|
||||
if (C->getZExtValue() == 0 || // 0 >>s V -> 0.
|
||||
if (C->isNullValue() || // 0 >>s V -> 0.
|
||||
C->isAllOnesValue()) // -1 >>s V -> -1.
|
||||
return N->getOperand(0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user