[all-commits] [llvm/llvm-project] 5ca775: [X86] Fold scalar_to_vector(i64 zext(x)) -> bitcas...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Fri Oct 21 02:48:00 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5ca77541446d7040638b53e0ddff3f76ee005681
      https://github.com/llvm/llvm-project/commit/5ca77541446d7040638b53e0ddff3f76ee005681
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-10-21 (Fri, 21 Oct 2022)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/buildvec-extract.ll
    M llvm/test/CodeGen/X86/combine-pmuldq.ll
    M llvm/test/CodeGen/X86/fast-isel-bitcast-crash.ll
    M llvm/test/CodeGen/X86/gather-addresses.ll
    M llvm/test/CodeGen/X86/insertelement-var-index.ll
    M llvm/test/CodeGen/X86/load-scalar-as-vector.ll
    M llvm/test/CodeGen/X86/vec_insert-7.ll
    M llvm/test/CodeGen/X86/vec_set-B.ll
    M llvm/test/CodeGen/X86/vector-shuffle-combining-xop.ll

  Log Message:
  -----------
  [X86] Fold scalar_to_vector(i64 zext(x)) -> bitcast(vzext_movl(scalar_to_vector(i32 x)))

Extends existing anyextend fold to make use of the implicit zero-extension of the movd instruction

This also helps replace some nasty xmm->gpr->xmm traffic with a shuffle pattern instead

Noticed while looking at D130953




More information about the All-commits mailing list