Page MenuHomePhabricator

[CodeGen][AArch64][SVE] Substitute [rdffr, ptest] => rdffrs
AbandonedPublic

Authored by peterwaller-arm on May 11 2021, 4:01 AM.

Details

Reviewers
efriedma
Summary

When a ptest is used to set flags from the output of rdffr, the ptest
can be eliminated, using a flags-setting rdffrs instead.

  • There is no unpredicated RDFFRS instruction.
  • If substituting RDFFR_PP, require that the mask argument of the PTEST matches that of the RDFFR_PP.
  • Move some precondition code up inside optimizePTestInstr, so that it covers the new code paths for RDFFR which return earlier.
    • Only consider RDFFR, PTEST in same basic block.
    • Check for other flag setting instructions between the two, abort if found.
    • Drop an old TODO comment about removing dead PTEST instructions.

RDFFR_P to follow in later patch.

Diff Detail

Unit TestsFailed

TimeTest
70 msx64 debian > Clang.Driver::debug-pass-structure.c
Script: -- : 'RUN: at line 2'; /mnt/disks/ssd0/agent/llvm-project/build/bin/clang -fexperimental-new-pass-manager -fdebug-pass-structure -O3 -S -emit-llvm /mnt/disks/ssd0/agent/llvm-project/clang/test/Driver/debug-pass-structure.c -o /dev/null 2>&1 | /mnt/disks/ssd0/agent/llvm-project/build/bin/FileCheck /mnt/disks/ssd0/agent/llvm-project/clang/test/Driver/debug-pass-structure.c --check-prefix=NEWPM

Event Timeline

peterwaller-arm requested review of this revision.May 11 2021, 4:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 11 2021, 4:01 AM
peterwaller-arm abandoned this revision.May 11 2021, 4:02 AM

Accidental dupe of D101357 due to arc diff not doing what I expected.

Update commit message.

peterwaller-arm abandoned this revision.May 11 2021, 4:19 AM

Apologies for the spam. Again, wrong revision because the commit message got stamped with it. :facepalm: