Page MenuHomePhabricator

[AArch64] Optimize lowering of 128-bit shifts by a variable
Needs ReviewPublic

Authored by efriedma on Oct 12 2020, 4:36 PM.



This takes advantage of the work that's been done on funnel shifts to make the implementation more readable.

I think we could shave off one more instruction in the funnel shift lowering: if we do the shifts in the opposite order, we can fold the shift by one into the orr. Mostly orthogonal to this patch, though.

The implementation here isn't really target-specific; maybe we should be doing this in target-independent code?

Diff Detail

Unit TestsFailed

4,220 mswindows > Clang-Unit.DirectoryWatcher/_/DirectoryWatcherTests_exe::DirectoryWatcherTest.AddFiles
Note: Google Test filter = DirectoryWatcherTest.AddFiles [==========] Running 1 test from 1 test case.
3,950 mswindows > Clang-Unit.DirectoryWatcher/_/DirectoryWatcherTests_exe::DirectoryWatcherTest.DeleteFile
Note: Google Test filter = DirectoryWatcherTest.DeleteFile [==========] Running 1 test from 1 test case.
4,019 mswindows > Clang-Unit.DirectoryWatcher/_/DirectoryWatcherTests_exe::DirectoryWatcherTest.ModifyFile
Note: Google Test filter = DirectoryWatcherTest.ModifyFile [==========] Running 1 test from 1 test case.
400 mswindows > lld.ELF/invalid::symtab-sh-info.s
Script: -- : 'RUN: at line 4'; c:\ws\w1\llvm-project\premerge-checks\build\bin\yaml2obj.exe --docnum=1 C:\ws\w1\llvm-project\premerge-checks\lld\test\ELF\invalid\symtab-sh-info.s -o C:\ws\w1\llvm-project\premerge-checks\build\tools\lld\test\ELF\invalid\Output\symtab-sh-info.s.tmp.o

Event Timeline

efriedma created this revision.Oct 12 2020, 4:36 PM
efriedma requested review of this revision.Oct 12 2020, 4:37 PM

I agree there isn't any reason not to try and move this to generic legalization - although we are still finding a few edge legalization cases where funnel/rotates fail on some targets so you might encounter that.

reverse ping?