Page MenuHomePhabricator

[PowerPC] Exploit `vrl(b|h|w|d)` to perform vector rotation
ClosedPublic

Authored by lkail on Dec 10 2019, 7:48 PM.

Details

Summary

Currently, we set legalization action of ISD::ROTL vectors as Expand in PPCISelLowering. However, we can exploit vrl(b|h|w|d) to lower ISD::ROTL directly.

Diff Detail

Event Timeline

lkail created this revision.Dec 10 2019, 7:48 PM
lkail updated this revision to Diff 233273.Dec 11 2019, 1:22 AM
Jim added a subscriber: Jim.Dec 15 2019, 10:11 PM
Jim added inline comments.
llvm/test/CodeGen/PowerPC/vector-rotates.ll
8

Could you add the indentation here for more readable?

steven.zhang accepted this revision.Dec 16 2019, 6:29 PM
steven.zhang added a subscriber: steven.zhang.

LGTM. But please hold on for some time if other guys have concern.

This revision is now accepted and ready to land.Dec 16 2019, 6:29 PM
lkail added inline comments.Dec 16 2019, 10:15 PM
llvm/test/CodeGen/PowerPC/vector-rotates.ll
8

I don't quite understand, can you be more specific please?

Jim added inline comments.Dec 16 2019, 10:31 PM
llvm/test/CodeGen/PowerPC/vector-rotates.ll
8

In most of the test case, it looks like:

; RUN: llc ...
; RUN:   -verify-machineinstrs ...
         ^
     has indentations here for more readable
lkail updated this revision to Diff 234216.Dec 16 2019, 10:44 PM

Add indentation in RUN lines.

lkail marked 2 inline comments as done.Dec 16 2019, 10:44 PM
Jim added inline comments.Dec 16 2019, 10:59 PM
llvm/test/CodeGen/PowerPC/vector-rotates.ll
8

; RUN: FileCheck ... line is the same. Thanks.

; RUN: llc ...
; RUN:   -verify-machineinstrs ...
; RUN:   FileCheck ...
lkail updated this revision to Diff 234425.Dec 17 2019, 5:22 PM
lkail marked an inline comment as done.
This revision was automatically updated to reflect the committed changes.