[llvm] [SPIR-V] Allow intrinsics with aggregate return type to reach GlobalISel (PR #108893)

Steven Perron via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 18 07:27:55 PDT 2024


================
@@ -1270,6 +1316,8 @@ Instruction *SPIRVEmitIntrinsics::visitInsertValueInst(InsertValueInst &I) {
 }
 
 Instruction *SPIRVEmitIntrinsics::visitExtractValueInst(ExtractValueInst &I) {
+  if (I.getAggregateOperand()->getType()->isAggregateType())
+    return &I;
----------------
s-perron wrote:

This looks strange to me. I'm new to the spir-v backend, so that does not mean too much. Why would we not generate the spv_extractv intrinsic now? I would expect that in essentially all cases the aggregate operand has an aggregate type.

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


More information about the llvm-commits mailing list