[PATCH] D134641: [AMDGPU][Backend] Fix user-after-free in AMDGPUReleaseVGPRs::isLastVGPRUseVMEMStore
Juan Manuel Martinez CaamaƱo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 3 07:56:28 PDT 2022
jmmartinez added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUReleaseVGPRs.cpp:80
+ BlockVMEMStore[MBB->getNumber()];
+ LastUseIsVMEMStore = LastUseIsVMEMStore ||
+ any_of(MBB->predecessors(),
----------------
There is a bug in here: if `BlockVMEMStore[MBB->getNumber()]` was initialized to false because the last instruction referencing a vgpr instruction is not a store, and for one of the predecessors the last instruction referencing a vgpr is a store, we may override the `false` value with a `true` which is not correct.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134641/new/
https://reviews.llvm.org/D134641
More information about the llvm-commits
mailing list