[all-commits] [llvm/llvm-project] 045b82: [GlobalISel] Use-Vector-Truncate Opt Needs Elt Typ...

Daniel Man via All-commits all-commits at lists.llvm.org
Fri Jun 27 00:41:43 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 045b82736702799f7f56da2f98a3fa1f2fae8d46
      https://github.com/llvm/llvm-project/commit/045b82736702799f7f56da2f98a3fa1f2fae8d46
  Author: Daniel Man <man.daniel.dev at gmail.com>
  Date:   2025-06-27 (Fri, 27 Jun 2025)

  Changed paths:
    M llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
    A llvm/test/CodeGen/AArch64/GlobalISel/prelegalizer-combiner-use-vector-truncate.mir

  Log Message:
  -----------
  [GlobalISel] Use-Vector-Truncate Opt Needs Elt Type Check (#146003)

In the pre-legalizer combiner, there exists a bug with UseVectorTruncate
match-apply optimization. When the destinations' types do not match the
vector element type of the G_UNMERGE_VALUES instruction, the resulting
collapsed truncate does not preserve original functional behavior. This
commit introduces a simple type check to ensure that the destination
types match the vector element type.



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