This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Custom lower some extloads
AbandonedPublic

Authored by mssimpso on Jan 27 2016, 1:14 PM.

Details

Reviewers
gberry
jmolloy
Summary

This patch adds custom lowering for sign- and any-extended loads of v2i8, v4i8 and v2i16. Instead of generating multiple loads followed by vector inserts, we now generate a single scalar load followed by a vector shuffle. This works was adapted from r213897 (the corresponding patch for the X86 target).

Diff Detail

Event Timeline

mssimpso updated this revision to Diff 46172.Jan 27 2016, 1:14 PM
mssimpso retitled this revision from to [AArch64] Custom lower some extloads.
mssimpso updated this object.
mssimpso added a subscriber: llvm-commits.
bmakam added a subscriber: bmakam.Jan 27 2016, 1:54 PM
jmolloy requested changes to this revision.Feb 15 2016, 6:55 AM
jmolloy edited edge metadata.

Hi Chad,

A couple of comments.

Thanks,

James

lib/Target/AArch64/AArch64ISelLowering.cpp
2334

Is this guaranteed to iterate in size order? Perhaps we sholud add a comment indicating that we rely upon this? (and an assert that the size of every item is greater than that of the preceding item?)

2343

I'm worried as to how this assert can fire. The logic for getting here looks the same for extload and sextload, so how is this OK for extloads and not for sextloads (and where do sextloads that would fire this assert get filtered out?)

2390

Why can't we zextload here (as well as sext and extloading)? Is there an instruction missing in the ISA for zexting?

This revision now requires changes to proceed.Feb 15 2016, 6:55 AM
mcrosier resigned from this revision.May 12 2016, 8:41 AM
mcrosier removed a reviewer: mcrosier.

Just getting this off my radar and I don't think Matt plans on continuing this work. If that's not the case, feel free to add me back as a reviewer.

mssimpso abandoned this revision.May 12 2016, 8:45 AM

Thanks, Chad. I have no plans as of now for this patch. The small performance improvement I thought I saw with this I think was due to alignment instead. We can always resurrect it if needed. And thanks James for the initial review!