HomePhabricator

[AMDGPU] Fix saving fp and bp

Authored by sebastian-ne on Apr 12 2021, 2:47 AM.

Description

[AMDGPU] Fix saving fp and bp

Spilling the fp or bp to scratch could overwrite VGPRs of inactive
lanes. Fix that by using only the active lanes of the scavenged VGPR.

This builds on the assumptions that

  1. a function is never called with exec=0
  2. lanes do not die in a function, i.e. exec!=0 in the function epilog
  3. no new lanes are active when exiting the function, i.e. exec in the epilog is a subset of exec in the prolog.

Differential Revision: https://reviews.llvm.org/D96869

Details

Committed
sebastian-neApr 12 2021, 2:52 AM
Differential Revision
D96869: [AMDGPU] Fix saving fp and bp
Parents
rGca3bae94c469: [AMDGPU] Autogenerate test. NFC
Branches
Unknown
Tags
Unknown