[llvm] [SPIR-V][Codegen] Add isPhi bit to MCInstrDesc/MIR definitions (PR #110019)

Nathan Gauër via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 30 09:30:53 PDT 2024


Keenuts wrote:

> * %retval.0.i = phi i32 [ 0, %sw.default.i ], [ 1, %entry ], [ 1, %entry ]

This is legal? "After this, the ‘phi’ instruction takes a list of pairs as arguments, with one pair for each predecessor basic block of the current block. "
Looks like there should be 1 value per predecessor, so only 2 pairs for this instruction no?
(Even if there are 2 edges, it's still the same predecessor)


https://github.com/llvm/llvm-project/pull/110019


More information about the llvm-commits mailing list