This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombiner] Support bswap as a part of load combine patterns
ClosedPublic

Authored by apilipenko on Feb 1 2017, 7:58 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

apilipenko created this revision.Feb 1 2017, 7:58 AM
rengolin added inline comments.
test/CodeGen/ARM/load-combine-big-endian.ll
428 ↗(On Diff #86640)

I'm surprised this doesn't use REV16.

test/CodeGen/ARM/load-combine.ll
386 ↗(On Diff #86640)

Or here.

filcab added inline comments.Feb 1 2017, 9:06 AM
test/CodeGen/ARM/load-combine-big-endian.ll
428 ↗(On Diff #86640)

REV16 has Requires<[IsARM, HasV6]>,, but from the run lines, it seems that the default for "arm" is probably before v6 (I tried looking for the default, but couldn't find it).
Could that be it?

rengolin added inline comments.Feb 1 2017, 9:18 AM
test/CodeGen/ARM/load-combine-big-endian.ll
428 ↗(On Diff #86640)

Ah, good catch! REV16 is available on ARMv6+, Thumb1, 2 and ARM (and our table gen descriptions have that already), but the check lines below are only for "arm" which is "ARMv4".

This test is ok (has the CHECK-ARMv6) but the LE below has "CHECK64" which is why I got confused. :)

test/CodeGen/ARM/load-combine.ll
395 ↗(On Diff #86640)

So we just need to fix the typo here: CHECK64 -> CHECK-ARMv6

apilipenko updated this revision to Diff 87224.Feb 6 2017, 7:06 AM

Fix the type CHECK64 -> CHECK-ARMv6 in ARM load-combine.ll test case.

RKSimon edited edge metadata.Feb 6 2017, 7:26 AM

Minor nit

lib/CodeGen/SelectionDAG/DAGCombiner.cpp
4474 ↗(On Diff #87224)

Drop the braces (style)

apilipenko updated this revision to Diff 87231.Feb 6 2017, 7:49 AM
RKSimon accepted this revision.Feb 6 2017, 8:33 AM

LGTM

This revision is now accepted and ready to land.Feb 6 2017, 8:33 AM
This revision was automatically updated to reflect the committed changes.