[InstCombine] Preserve alignment in atomicrmw -> store fold
authorNikita Popov <npopov@redhat.com>
Mon, 9 Jan 2023 14:36:32 +0000 (15:36 +0100)
committerNikita Popov <npopov@redhat.com>
Mon, 9 Jan 2023 14:37:24 +0000 (15:37 +0100)
commit59f91ddf90d470e113f9322314ce7c36e21ff0b3
tree1177c19872de2cb4e643f96e579b30b38b9925a0
parent15e734fe6c6ee96a24574773f0c7492fd4bbb889
[InstCombine] Preserve alignment in atomicrmw -> store fold

Preserve the alignment of the original atomicrmw, rather than using
the ABI alignment.

The same problem exists for loads, but that code is being removed
in D141277 anyway.
llvm/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp
llvm/test/Transforms/InstCombine/atomicrmw.ll