mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
[mips] Refactor and simplify MipsSEDAGToDAGISel::selectIntAddrLSL2MM(). NFC.
Reviewers: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7618 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229140 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
00c4738c11
commit
a4e58223cb
@ -410,18 +410,15 @@ bool MipsSEDAGToDAGISel::selectIntAddrMM(SDValue Addr, SDValue &Base,
|
||||
bool MipsSEDAGToDAGISel::selectIntAddrLSL2MM(SDValue Addr, SDValue &Base,
|
||||
SDValue &Offset) const {
|
||||
if (selectAddrFrameIndexOffset(Addr, Base, Offset, 7)) {
|
||||
if (dyn_cast<FrameIndexSDNode>(Base))
|
||||
if (isa<FrameIndexSDNode>(Base))
|
||||
return false;
|
||||
else {
|
||||
ConstantSDNode *CN = dyn_cast<ConstantSDNode>(Offset);
|
||||
if (CN) {
|
||||
unsigned CnstOff = CN->getZExtValue();
|
||||
if (CnstOff == (CnstOff & 0x3c))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
if (ConstantSDNode *CN = dyn_cast<ConstantSDNode>(Offset)) {
|
||||
unsigned CnstOff = CN->getZExtValue();
|
||||
return (CnstOff == (CnstOff & 0x3c));
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// For all other cases where "lw" would be selected, don't select "lw16"
|
||||
|
Loading…
Reference in New Issue
Block a user