[PATCH] D32706: [AArch64] Consider lengthening instructions in cast cost calculation

Matthew Simpson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 2 08:19:14 PDT 2017


mssimpso added inline comments.


================
Comment at: lib/Target/AArch64/AArch64TargetTransformInfo.h:46-47
 
+  bool isLengthening(Type *Dst, Type *Src, const Instruction *I);
+
 public:
----------------
kristof.beyls wrote:
> mssimpso wrote:
> > kristof.beyls wrote:
> > > I think the term "widening" is used for this operation, both in the LLVM code base, as well as in the ARMARM.
> > > So, probably best to use isWidening here too.
> > From what I've read, ARM uses "lengthening" to refer to the case where both operands are doublewords (e.g., uaddl) and "widening" to refer to the case when only one operand is a doubleword (e.g., uaddw). This patch only deals with the lengthening cases. We might handle the widening cases in the future, but they may not be as straightforward because the operand order matters. I can add a comment here explaining all of this.
> I was making my comment based on Table C3-67 which contains UADDL in the ARMARM copy at https://static.docs.arm.com/ddi0487/b/DDI0487B_a_armv8_arm.pdf.
> The table header is "SIMD widening and narrowing arithmetic instructions".
> The table entry for UADDL has "UADDL, UADDL2 Unsigned add long (vector form)".
> Therefore, I am assuming the L in the mnemonic stands for "long" not "lengthening".
> 
> Maybe there is other documentation that specifically calls this specific case "lengthening"?
I was looking at different documentation (possibly outdated): http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0024a/ch07s03.html. Yours looks better to me, so let's go with isWideningFree, like you suggested.


https://reviews.llvm.org/D32706





More information about the llvm-commits mailing list