Page MenuHomePhabricator

[PowerPC][Power10] Exploit store rightmost vector element instructions.
Needs ReviewPublic

Authored by kamaub on Oct 10 2020, 11:40 AM.

Details

Reviewers
amyk
lei
nemanjai
Group Reviewers
Restricted Project
Summary

Using the store rightmost vector element instructions to do vector
element extraction and store. The rightmost vector element on little
endian is the zeroth vector element, with these patterns that element
can be extracted and stored in one instruction for all vector types.

Diff Detail

Unit TestsFailed

TimeTest
4,240 mswindows > Clang-Unit.DirectoryWatcher/_/DirectoryWatcherTests_exe::DirectoryWatcherTest.AddFiles
Note: Google Test filter = DirectoryWatcherTest.AddFiles [==========] Running 1 test from 1 test case.
3,980 mswindows > Clang-Unit.DirectoryWatcher/_/DirectoryWatcherTests_exe::DirectoryWatcherTest.DeleteFile
Note: Google Test filter = DirectoryWatcherTest.DeleteFile [==========] Running 1 test from 1 test case.
4,070 mswindows > Clang-Unit.DirectoryWatcher/_/DirectoryWatcherTests_exe::DirectoryWatcherTest.ModifyFile
Note: Google Test filter = DirectoryWatcherTest.ModifyFile [==========] Running 1 test from 1 test case.

Event Timeline

kamaub created this revision.Oct 10 2020, 11:40 AM
kamaub requested review of this revision.Oct 10 2020, 11:40 AM
kamaub added a project: Restricted Project.Oct 10 2020, 11:44 AM
lei added inline comments.Oct 22 2020, 7:31 AM
llvm/test/CodeGen/PowerPC/builtins-ppc-p10vsx.ll
1

There's some redundancies here:

  1. The default CHECK are not used in any of the run lines, but are updated in some cases.
  2. The newly generated CHECK-LE and CHECK-BE are at times exact duplicate of each other and of the default CHECK.

Suggest to update thus so it's more clear what the changes are:

RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
; RUN:   -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | \
; RUN:   FileCheck %s --check-prefix=CHECK,LE
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
; RUN:   -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | \
; RUN:   FileCheck %s --check-prefix=CHECK,BE

For cases where there is a differnce in LE and BE behaviour, remove the default CHECK and add new. Otherwise just leave the original default CHECKs.

llvm/test/CodeGen/PowerPC/store-rightmost-vector-elt.ll
4

run line for BE?