Skip to content

Commit

Permalink
[SYCL] Fix invalid interator after removal in SYCLJointMatrixTransform (
Browse files Browse the repository at this point in the history
#16134)

Can be exposed in windows debug build on the tests added by the original
patch: LLVM::SYCLLowerIR/JointMatrixTransform/access-chain-no-uses.ll

Author: Jinsong Ji <[email protected]>

Signed-off-by: Sidorov, Dmitry <[email protected]>
  • Loading branch information
MrSidims authored Nov 20, 2024
1 parent d9c7bcb commit 8ad42d5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions llvm/lib/SYCLLowerIR/SYCLJointMatrixTransform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ static constexpr char MATRIX_TYPE[] = "spirv.CooperativeMatrixKHR";
// its users and operands to make LLVM IR more SPIR-V friendly.
bool transformAccessChain(Function *F) {
bool ModuleChanged = false;
for (auto I : F->users()) {
auto *CI = dyn_cast<CallInst>(I);
for (auto I = F->user_begin(), E = F->user_end(); I != E;) {
User *U = *I++;
auto *CI = dyn_cast<CallInst>(U);
if (!CI)
continue;

Expand Down

0 comments on commit 8ad42d5

Please sign in to comment.