mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Fix this logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23756 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -808,7 +808,7 @@ SDOperand DAGCombiner::visitAND(SDNode *N) {
|
|||||||
if (ConstantSDNode *N01C = dyn_cast<ConstantSDNode>(N0.getOperand(1))) {
|
if (ConstantSDNode *N01C = dyn_cast<ConstantSDNode>(N0.getOperand(1))) {
|
||||||
// If the RHS of the AND has zeros where the sign bits of the SRA will
|
// If the RHS of the AND has zeros where the sign bits of the SRA will
|
||||||
// land, turn the SRA into an SRL.
|
// land, turn the SRA into an SRL.
|
||||||
if (MaskedValueIsZero(N1, (~0ULL << N01C->getValue()) &
|
if (MaskedValueIsZero(N1, (~0ULL << (OpSizeInBits-N01C->getValue())) &
|
||||||
(~0ULL>>(64-OpSizeInBits)), TLI)) {
|
(~0ULL>>(64-OpSizeInBits)), TLI)) {
|
||||||
WorkList.push_back(N);
|
WorkList.push_back(N);
|
||||||
CombineTo(N0.Val, DAG.getNode(ISD::SRL, VT, N0.getOperand(0),
|
CombineTo(N0.Val, DAG.getNode(ISD::SRL, VT, N0.getOperand(0),
|
||||||
|
Reference in New Issue
Block a user