[InstCombine] Handle atomic memset in the same way as regular memset
authorDaniel Neilson <dneilson@azul.com>
Fri, 11 May 2018 20:04:50 +0000 (20:04 +0000)
committerDaniel Neilson <dneilson@azul.com>
Fri, 11 May 2018 20:04:50 +0000 (20:04 +0000)
commitf6651d4d9438e185ae92c55978c11700dce45cee
treeb0592b3f7194052a7262556b6054b01acf44b9ec
parentb262a0489b095a3e4470a6503ca3071390b3c60c
[InstCombine] Handle atomic memset in the same way as regular memset

Summary:
This change adds handling of the atomic memset intrinsic to the
code path that simplifies the regular memset. In practice this means
that we will now also expand a small constant-length atomic memset
into a single unordered atomic store.

Reviewers: apilipenko, skatkov, mkazantsev, anna, reames

Reviewed By: reames

Subscribers: reames, llvm-commits

Differential Revision: https://reviews.llvm.org/D46660

llvm-svn: 332132
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/lib/Transforms/InstCombine/InstCombineInternal.h
llvm/test/Transforms/InstCombine/element-atomic-memintrins.ll