[all-commits] [llvm/llvm-project] 686a03: [Analysis] add query to get splat value from array...

RotateRight via All-commits all-commits at lists.llvm.org
Wed Feb 5 11:56:42 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 686a038ed8f96e5539c54fea28aedac63145cf71
      https://github.com/llvm/llvm-project/commit/686a038ed8f96e5539c54fea28aedac63145cf71
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-02-05 (Wed, 05 Feb 2020)

  Changed paths:
    M llvm/include/llvm/Analysis/VectorUtils.h
    M llvm/lib/Analysis/VectorUtils.cpp
    M llvm/unittests/Analysis/VectorUtilsTest.cpp

  Log Message:
  -----------
  [Analysis] add query to get splat value from array of ints

I was debug stepping through an x86 shuffle lowering and
noticed we were doing an N^2 search for splat index. I
didn't find the equivalent functionality anywhere else in
LLVM, so here's a helper that takes an array of int and
returns a splatted index while ignoring undefs (any
negative value).

This might also be used inside existing
ShuffleVectorInst/ShuffleVectorSDNode functions and/or
help with D72467.

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




More information about the All-commits mailing list