[all-commits] [llvm/llvm-project] 4b2537: [X86] combineINSERT_SUBVECTOR - attempt to widen m...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sat Apr 18 01:29:07 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4b2537b15c3eb73bad71c29bff61bb2c2b8bfe8e
      https://github.com/llvm/llvm-project/commit/4b2537b15c3eb73bad71c29bff61bb2c2b8bfe8e
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2026-04-18 (Sat, 18 Apr 2026)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/masked_gather.ll
    M llvm/test/CodeGen/X86/masked_gather_scatter.ll
    M llvm/test/CodeGen/X86/masked_load.ll
    M llvm/test/CodeGen/X86/masked_store.ll
    M llvm/test/CodeGen/X86/pr192034.ll

  Log Message:
  -----------
  [X86] combineINSERT_SUBVECTOR - attempt to widen mask predicate as scalar integer instead of inserting into a zero vXi1 vector (#192699)

Fold vXi1 insert_subvector(zero_vector(),bitcast(scalar_mask),idx) ->
bitcast(shl(zext(scalar_mask),idx))

vXi1 zero widening and insertion has to rely on kshiftl/kshiftr pairs,
but if the mask was a scalar it can be a lot cheaper to just widen it to
a wider (legal) scalar first.

Cleans up some codegen for #192034 - first step towards pruning all the
VMOVSH patterns we've ended up :/



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