[PATCH] AArch64: Fold immediate into the immediate field of logical instructions

Chad Rosier mcrosier at codeaurora.org
Thu Oct 2 16:21:33 PDT 2014


Nice gain!!  Just a few nits.

================
Comment at: include/llvm/Target/TargetLowering.h:2056
@@ +2055,3 @@
+  /// instruction. Return true if the immediate node doesn't need further
+  /// optimization and set the New and Old fields of LTO if a new immediate
+  /// node was created.
----------------
s/LTO/TLO ?

================
Comment at: lib/Target/AArch64/AArch64ISelLowering.cpp:674
@@ +673,3 @@
+    ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op.getOperand(1));
+
+    if (!C)
----------------
Remove vertical whitespace.

================
Comment at: lib/Target/AArch64/AArch64ISelLowering.cpp:681
@@ +680,3 @@
+    unsigned Size = std::max(VT.getSizeInBits(), 32u);
+    assert(Size > 0 && Size <= 64);
+    uint64_t Mask = ((uint64_t)(-1LL) >> (64 - Size));
----------------
Please add an assert message:

assert(cond && "msg");

http://reviews.llvm.org/D5591






More information about the llvm-commits mailing list