[all-commits] [llvm/llvm-project] 9424f3: [InstCombine] Extend folding of aggregate construc...

weiguozhi via All-commits all-commits at lists.llvm.org
Thu Nov 21 08:34:49 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9424f3dcc5a3f1dada99831b87b0b502a7667d48
      https://github.com/llvm/llvm-project/commit/9424f3dcc5a3f1dada99831b87b0b502a7667d48
  Author: weiguozhi <57237827+weiguozhi at users.noreply.github.com>
  Date:   2024-11-21 (Thu, 21 Nov 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
    A llvm/test/Transforms/InstCombine/fold-aggregate-reconstruction.ll
    M llvm/test/Transforms/InstCombine/merging-multiple-stores-into-successor.ll
    M llvm/test/Transforms/InstCombine/phi-aware-aggregate-reconstruction.ll

  Log Message:
  -----------
  [InstCombine] Extend folding of aggregate construction to cases when source aggregates are partially available (#100828)

Function foldAggregateConstructionIntoAggregateReuse can fold
  insertvalue(phi(extractvalue(src1), extractvalue(src2)))
into
  phi(src1, src2)
when we can find source aggregates in all predecessors.

This patch extends it to handle following case
  insertvalue(phi(extractvalue(src1), elm2))
into
  phi(src1, insertvalue(elm2))
with the condition that the predecessor without source aggregate has
only one successor.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list