[PATCH] D150771: [RISCV] Set Fast flag for unaligned scalar memory accesses
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 21 07:30:14 PDT 2023
reames added a comment.
In D150771#4520362 <https://reviews.llvm.org/D150771#4520362>, @craig.topper wrote:
> In D150771#4520282 <https://reviews.llvm.org/D150771#4520282>, @reames wrote:
>
>> Reverse ping.
>>
>> I spent some time looking at this over the last few days, and I think this makes sense to get landed. I do want to request that you also enabled the Fast flag for the vector analogy flag. From what I can tell, it causes no additional test diff, but doing them together is likely safer for two reasons. First, it corresponds to the tested downstream config. Second, a number of the merge transforms are in terms of comparisons of "how fast" operations are. Thus having one set and not the other can result in odd results.
>
> If I remember right setting fast for vector has some effect on memcpy and memset expansion.
It does, but it's currently pretty indirect. Our maximum size uses for memset/memcpy lowering is currently i64. The store merging code then kicks in to form broader loads and stores. As a result, the impact on mem* lowering is the impact on store merging and load combining. This change does enable merging for unaligned cases, and thus does impact the mem* lowering.
See test/CodeGen/RISCV/rvv/memset-inline.ll (once this patch is rebased)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150771/new/
https://reviews.llvm.org/D150771
More information about the llvm-commits
mailing list