Skip to content

Commit

Permalink
adjust for llvm 14
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 e19618f commit 0c84e7c
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 @@ -3059,10 +3059,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 0c84e7c

Please sign in to comment.