[all-commits] [llvm/llvm-project] 79ea83: [SelectionDAG] memcpy expansion of const volatile ...
simonwallis2 via All-commits
all-commits at lists.llvm.org
Mon Sep 7 05:26:52 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 79ea83e104e368ef0f520f1bfa74c15d91baef93
https://github.com/llvm/llvm-project/commit/79ea83e104e368ef0f520f1bfa74c15d91baef93
Author: Simon Wallis <simon.wallis2 at arm.com>
Date: 2020-09-07 (Mon, 07 Sep 2020)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
A llvm/test/CodeGen/ARM/memcpy-const-vol-struct.ll
Log Message:
-----------
[SelectionDAG] memcpy expansion of const volatile struct ignores const zero
In getMemcpyLoadsAndStores(), a memcpy where the source is a zero constant is expanded to a MemOp::Set instead of a MemOp::Copy, even when the memcpy is volatile.
This is incorrect.
The fix is to add a check for volatile, and expand to MemOp::Copy in the volatile case.
Reviewed By: chill
Differential Revision: https://reviews.llvm.org/D87134
More information about the All-commits
mailing list