[all-commits] [llvm/llvm-project] c486b8: [x86] try harder to scalarize a vector load with e...
Sanjay Patel via All-commits
all-commits at lists.llvm.org
Sun Feb 13 05:34:37 PST 2022
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2022-02-13 (Sun, 13 Feb 2022)
[x86] try harder to scalarize a vector load with extracted integer op uses
This is a retry of b4b97ec813a0 - that was reverted because it
could cause miscompiles by illegally reordering memory operations.
A new test based on #53695 is added here to verify we do not have
that same problem.
extract_vec_elt (load X), C --> scalar load (X+C)
As noted in the comment, DAGCombiner has this fold -- and the code in this
patch is adapted from DAGCombiner::scalarizeExtractedVectorLoad() -- but
x86 should benefit even if the loaded vector has other uses as long as we
apply some other x86-specific conditions. The motivating example from #50310
is shown in vec_int_to_fp.ll.
Differential Revision: https://reviews.llvm.org/D118376
More information about the All-commits