[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 06:06:53 PST 2022
spatel marked 2 inline comments 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:
> spatel wrote:
> > 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.
> I see your point, it's fine. Thank you.
You're right, and it's not difficult to add a dedicated test. :)
e9768a2a44a1
The other tests may not show the minimum difference if this transform changes in the future.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118376/new/
https://reviews.llvm.org/D118376
More information about the llvm-commits
mailing list