mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
945ea72b3a
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