[all-commits] [llvm/llvm-project] afac94: [GlobalISel] Fix crash in matchCombineInsertVecElt...

Mateusz Chudyk via All-commits all-commits at lists.llvm.org
Tue Jul 14 01:36:38 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: afac9463c13d6e44f287ee693309497cb79e1e10
      https://github.com/llvm/llvm-project/commit/afac9463c13d6e44f287ee693309497cb79e1e10
  Author: Mateusz Chudyk <mateusz.chudyk at intel.com>
  Date:   2026-07-14 (Tue, 14 Jul 2026)

  Changed paths:
    M llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
    M llvm/test/CodeGen/AArch64/GlobalISel/combine-insert-vec-elt.mir

  Log Message:
  -----------
  [GlobalISel] Fix crash in matchCombineInsertVecElts with INLINEASM-de… (#208225)

…fined base

matchCombineInsertVecElts walks the G_INSERT_VECTOR_ELT chain by
following operand 0 of the source-defining instruction. When the base
vector is defined by INLINEASM, operand 0 is the asm string (not a
register), so calling getReg() triggers an assertion:

  Assertion `isReg() && "This is not a register operand!"' failed.

Fix by using the mi_match overload that takes a MachineInstr instead of
a Register, which checks the instruction opcode before accessing any
operands.



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