This is an archive of the discontinued LLVM Phabricator instance.

AArch64: Use CMP;CCMP sequences for and/or/setcc trees.
ClosedPublic

Authored by MatzeB on Jun 19 2015, 3:04 PM.

Details

Summary

This is a revised version of http://reviews.llvm.org/D8232.

It turned out the logic in isConjunctionDisjunctionTree() and emitConjunctionDisjunctionTree() is trickier when it comes to OR-expressions so I think another review is warranted for the update. There is a detailed explanation of the types of expressions that can and cannot be matched now. The patch also adds more testcases for the tricky situations. Everything else is the same as in the previous version.

Diff Detail

Repository
rL LLVM

Event Timeline

MatzeB updated this revision to Diff 28049.Jun 19 2015, 3:04 PM
MatzeB retitled this revision from to AArch64: Use CMP;CCMP sequences for and/or/setcc trees..
MatzeB updated this object.
MatzeB edited the test plan for this revision. (Show Details)
MatzeB added a reviewer: t.p.northover.
MatzeB set the repository for this revision to rL LLVM.
MatzeB added subscribers: Unknown Object (MLST), charlieturner7c5, chatur01.

Hi Matthias,

I couldn't find anything terribly wrong with it, but then again, I'm not terribly familiar with CCMP and others. Apart from the goto usage that can easily be replaced by a local flag, I have no reservations. But please wait for Tim, James or someone else with more knowledge on AArch64 to approve.

cheers,
--renato

lib/Target/AArch64/AArch64ISelLowering.cpp
1480

I don't think this is a really good use case for a goto.

Apart from the goto comment which Renato already mentioned, this looks OK to me.

I've run it through all our tests and this time there were no conformance regressions (woohoo!). LNT diff looks like:

Performance Regressions - Execution TimeDelta
MultiSource/Applications/sqlite3/sqlite34.53%
MultiSource/Benchmarks/Olden/bh/bh3.85%
SingleSource/Benchmarks/Shootout-C++/lists3.20%
MultiSource/Applications/lua/lua2.70%
Performance Improvements - Execution TimeDelta
MultiSource/Benchmarks/ASC_Sequoia/AMGmk/AMGmk-10.44%
MultiSource/Benchmarks/VersaBench/bmm/bmm-1.15%

That's on a Cortex-A57.

lib/Target/AArch64/AArch64ISelLowering.cpp
1480

Yeah I really don't like the goto here, sorry.

This revision was automatically updated to reflect the committed changes.