[all-commits] [llvm/llvm-project] d5148f: [X86] Fix arithmetic error in extractVector (#128052)

Daniel Zabawa via All-commits all-commits at lists.llvm.org
Mon Feb 24 05:39:51 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d5148f000a9213d5e64f49c67d0e861e8b303d92
      https://github.com/llvm/llvm-project/commit/d5148f000a9213d5e64f49c67d0e861e8b303d92
  Author: Daniel Zabawa <daniel.zabawa at intel.com>
  Date:   2025-02-24 (Mon, 24 Feb 2025)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    A llvm/test/CodeGen/X86/isel-extract-subvector-non-pow2-elems.ll

  Log Message:
  -----------
  [X86] Fix arithmetic error in extractVector (#128052)

The computation of the element count for the result VT in extractVector
is incorrect when vector width does not divide VT.getSizeInBits(), which
can occur when the source vector element count is not a power of two,
e.g. extracting a vectorWidth 256b vector from a 384b source.

This rewrites the expression so the division is exact given that
vectorWidth is a multiple of the source element size.



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