[llvm] [SPIRV] Lower load/store atomic to OpAtomicLoad/OpAtomicStore (PR #185696)
Juan Manuel Martinez CaamaƱo via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 23 01:59:11 PDT 2026
================
@@ -51,6 +51,10 @@ class SPIRVTypeInst {
// Returns true if this is an OpTypeInt instruction.
// If N is non-zero, also checks that the bit width matches N.
bool isTypeIntN(unsigned N = 0) const;
+ // Returns true if this is an OpTypeFloat instruction.
+ bool isAnyTypeFloat() const;
----------------
jmmartinez wrote:
TBH, I didn't know how to call it.
Originally I thought about having something that takes only the width into account. But then, `isTypeFloat(16)` does it match `half`, both `(half, bf16)` ?
When I added the encoding as an optional, eventually I realized it was a bad idea, since no-encoding means it can be `(half, float, double)`.
Writhing this, I'm thinking that I can get away with just checking the opcode explicitly and that I'm over thinking it.
https://github.com/llvm/llvm-project/pull/185696
More information about the llvm-commits
mailing list