[PATCH] D118376: [x86] try harder to scalarize a vector load with extracted integer op uses
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 28 05:00:33 PST 2022
spatel marked an inline comment as done.
spatel added inline comments.
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:43086-43088
+ // Note: Unlike the related fold for this in DAGCombiner, this is not limited
+ // to a single-use of the loaded vector. For the reasons above, we
+ // expect this to be profitable even if it creates an extra load.
----------------
pengfei wrote:
> Add a regression test for it?
There are examples of this in the existing tests diffs - we have both a scalar load and vector load from the same address.
See:
vec_cast.ll -> define <3 x i16> @h(<3 x i32> %a)
vec_int_to_fp.ll -> define <2 x double> @sitofp_load_2i64_to_2f64(<2 x i64> *%a)
We might still be able to do better on those tests, but that demonstrates what I suggested in this comment. Does that make sense? I can try to come up with another case if the existing tests are not clear.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118376/new/
https://reviews.llvm.org/D118376
More information about the llvm-commits
mailing list