[llvm] [LV] Add initial support for vectorizing literal struct return values (PR #109833)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 10 02:10:16 PDT 2024


================
@@ -1277,6 +1277,13 @@ void VPWidenRecipe::execute(VPTransformState &State) {
     State.addMetadata(V, dyn_cast_or_null<Instruction>(getUnderlyingValue()));
     break;
   }
+  case Instruction::ExtractValue: {
+    Value *Op = State.get(getOperand(0));
+    Value *Extract = Builder.CreateExtractValue(
+        Op, cast<ExtractValueInst>(getUnderlyingValue())->getIndices());
----------------
fhahn wrote:

This should use the operand of the recipe and not access the underlying IR value

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


More information about the llvm-commits mailing list