[llvm] [NVPTX] Load/Store/Fence syncscope support (PR #106101)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 12 11:54:40 PDT 2024


================
@@ -1189,7 +1283,7 @@ bool NVPTXDAGToDAGISel::tryLoad(SDNode *N) {
   std::optional<unsigned> Opcode;
   MVT::SimpleValueType TargetVT = LD->getSimpleValueType(0).SimpleTy;
 
-  SmallVector<SDValue, 12> Ops({getI32Imm(InstructionOrdering, DL),
+  SmallVector<SDValue, 12> Ops({getI32Imm(Ordering, DL), getI32Imm(Scope, DL),
----------------
gonzalobg wrote:

12 is just the capacity, so the worst that may happen is that it falls back to heap allocation.
If we want a vector that fails when the static capacity is exceeded (to prevent any heap allocation fallback), using C++26 `inplace_vector<T, Capacity>` is probably a better choice. If that's the case, does LLVM have something like that?

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


More information about the llvm-commits mailing list