[PATCH] [PATCH]Select wide immediate offset into [Base+XReg] addressing mode
Chad Rosier
mcrosier at codeaurora.org
Tue Sep 30 07:01:31 PDT 2014
================
Comment at: lib/Target/AArch64/AArch64ISelDAGToDAG.cpp:780
@@ -779,1 +779,3 @@
+bool FitADD(int64_t ImmOff) {
+ // Constant in [0x0, 0xfff] can be encoded in ADD.
----------------
Please make this a static function.
Functions should be in camel case and start with a lower case letter.
No particularly fond of the name. How about "isPreferredXROImm" or something of that nature? (Not sold on this either, but I think it's a step in the right direction.)
================
Comment at: lib/Target/AArch64/AArch64ISelDAGToDAG.cpp:831
@@ +830,3 @@
+ SDLoc DL(N.getNode());
+ SmallVector<SDValue, 1> Ops;
+ Ops.push_back(RHS);
----------------
No need for SmallVector + push_back.
SDValue Ops[] = { RHS };
================
Comment at: lib/Target/AArch64/AArch64ISelDAGToDAG.cpp:839
@@ -803,1 +838,3 @@
+ }
+
// Remember if it is worth folding N when it produces extended register.
----------------
Don't we want to keep this bit of logic? (lines 789-793)
---------------------------------------------------------------------------------------------------------------------
// We don't want to match immediate adds here, because they are better lowered
// to the register-immediate addressing modes.
if (isa<ConstantSDNode>(LHS) || isa<ConstantSDNode>(RHS))
return false;
================
Comment at: test/CodeGen/AArch64/arm64-addrmode.ll:182
@@ +181,1 @@
+}
\ No newline at end of file
----------------
Please add a newline.
http://reviews.llvm.org/D5477
More information about the llvm-commits
mailing list