[PATCH] [mips] Refactor and simplify MipsSEDAGToDAGISel::selectIntAddrLSL2MM(). NFC.
Vasileios Kalintiris
Vasileios.Kalintiris at imgtec.com
Fri Feb 13 11:16:23 PST 2015
REPOSITORY
rL LLVM
http://reviews.llvm.org/D7618
Files:
llvm/trunk/lib/Target/Mips/MipsSEISelDAGToDAG.cpp
Index: llvm/trunk/lib/Target/Mips/MipsSEISelDAGToDAG.cpp
===================================================================
--- llvm/trunk/lib/Target/Mips/MipsSEISelDAGToDAG.cpp
+++ llvm/trunk/lib/Target/Mips/MipsSEISelDAGToDAG.cpp
@@ -410,18 +410,15 @@
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"
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7618.19910.patch
Type: text/x-patch
Size: 1068 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150213/76dd0a41/attachment.bin>
More information about the llvm-commits
mailing list