Skip to content

Commit

Permalink
adjust for llvm 15
Browse files Browse the repository at this point in the history
Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
  • Loading branch information
MrSidims committed Nov 7, 2024
1 parent b3cab3d commit 4ec141c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/SPIRV/SPIRVReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3103,10 +3103,14 @@ static void validatePhiPredecessors(Function *F) {
for (PHINode &Phi : BB.phis()) {
SmallVector<Value *> Vs;
SmallVector<BasicBlock *> Bs;
for (auto [V, B] : zip(Phi.incoming_values(), Phi.blocks())) {
unsigned N = PredsCnt[B];
Vs.insert(Vs.end(), N, V);
Bs.insert(Bs.end(), N, B);
auto Vals = Phi.incoming_values();
auto Blocks = Phi.blocks();
auto *VIt = Vals.begin();
auto *BIt = Blocks.begin();
for (; VIt != Vals.end() && BIt != Blocks.end(); ++VIt, ++BIt) {
const unsigned N = PredsCnt[*BIt];
Vs.insert(Vs.end(), N, *VIt);
Bs.insert(Bs.end(), N, *BIt);
}
unsigned I = 0;
for (unsigned N = Phi.getNumIncomingValues(); I < N; ++I) {
Expand Down

0 comments on commit 4ec141c

Please sign in to comment.