[all-commits] [llvm/llvm-project] b4b97e: [x86] try harder to scalarize a vector load with e...

Sanjay Patel via All-commits all-commits at lists.llvm.org
Fri Jan 28 07:23:22 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b4b97ec813a02585000f30ac7d532dda74e8bfda
      https://github.com/llvm/llvm-project/commit/b4b97ec813a02585000f30ac7d532dda74e8bfda
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/2011-12-26-extractelement-duplicate-load.ll
    M llvm/test/CodeGen/X86/avx512-cvt.ll
    M llvm/test/CodeGen/X86/bitcast-vector-bool.ll
    M llvm/test/CodeGen/X86/extractelement-load.ll
    M llvm/test/CodeGen/X86/oddsubvector.ll
    M llvm/test/CodeGen/X86/pr45378.ll
    M llvm/test/CodeGen/X86/scalar_widen_div.ll
    M llvm/test/CodeGen/X86/shrink_vmul.ll
    M llvm/test/CodeGen/X86/vec_cast.ll
    M llvm/test/CodeGen/X86/vec_int_to_fp.ll

  Log Message:
  -----------
  [x86] try harder to scalarize a vector load with extracted integer op uses

extract_vec_elt (load X), C --> scalar load (X+C)

As noted in the comment, DAGCombiner has this fold -- and the code in this
patch is adapted from DAGCombiner::scalarizeExtractedVectorLoad() -- but
x86 should benefit even if the loaded vector has other uses as long as we
apply some other x86-specific conditions. The motivating example from #50310
is shown in vec_int_to_fp.ll.

Fixes #50310

Differential Revision: https://reviews.llvm.org/D118376




More information about the All-commits mailing list