[LV] Use cost base decision for uniform mem op strategy [nfc-ish]
authorPhilip Reames <preames@rivosinc.com>
Wed, 3 Aug 2022 14:44:39 +0000 (07:44 -0700)
committerPhilip Reames <listmail@philipreames.com>
Wed, 3 Aug 2022 14:47:24 +0000 (07:47 -0700)
commita1cab0daae43ad2c81e30e73d250b05e64963065
tree3488f16623f962db3de657c7047ee1716eaf1d63
parentbf6db18e52815475baebff2c330763fedac6b5e4
[LV] Use cost base decision for uniform mem op strategy [nfc-ish]

This is mostly a stylistic change to make the uniform memop widening cost
code fit more naturally with the sourounding code.  Its not strictly
speaking NFC as I added in the store with invariant value case, and we
could in theory have a target where a gather/scatter is cheaper than a
single load/store... but it's probably NFC in practice.  Note that the
scatter/gather result can still be overriden later if the result is
uniform-by-parts.
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp