[PATCH] D115786: [SPIR-V 2/6] Add SPIRV{InstrFormats,InstrInfo,RegisterInfo,RegisterBanks...}.td

Renato Golin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 12 01:17:57 PST 2022


rengolin added inline comments.


================
Comment at: llvm/lib/Target/SPIRV/SPIRVInstrInfo.td:67
+  }
+  if genV then {
+    if genF then {
----------------
zuban32 wrote:
> rengolin wrote:
> > I'm guessing `genV` also defines `SF?Cond` and `SI?Cond`? Ie. the `VS` and `VI` are in addition to those.
> Not sure I understand you comment. This multiclass may be used to generated any of scalar/vector integer/float versions of ternary instructions with either scalar or vectors first operand.
> 
> Now as I'm looking into it it seems quite redundant and irrelevant. It was introduced when we planned to move all of the selection stuff to tblgen from plain C++, but now it seems unrealistic so we may select `OpSelect` with C++ and remove this whole mclass.
What I meant is that, in this definition, `genV` would have all 8 `SF?Conv`, `SI?Conv`, `VS?Conv` and `VI?Conv`, while `not-genV` would only have the initial 4.

I just wanted to make sure that was the intent, rather than `genV` only having the latter 4.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115786/new/

https://reviews.llvm.org/D115786



More information about the llvm-commits mailing list