[SROA] Don't de-atomic volatile loads and stores
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 14 Jul 2015 06:19:58 +0000 (06:19 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 14 Jul 2015 06:19:58 +0000 (06:19 +0000)
commit62690b195209faa25cf2f98ccb0669bc821b0cfe
tree682ecc04ff35f874a13476efe457a4e85d417fef
parent4ca1903696af3408a27f9f5766b71ed7b0dbf996
[SROA] Don't de-atomic volatile loads and stores

Volatile loads and stores are made visible in global state regardless of
what memory is involved.  It is not correct to disregard the ordering
and synchronization scope because it is possible to synchronize with
memory operations performed by hardware.

This partially addresses PR23737.

llvm-svn: 242126
llvm/lib/Transforms/Scalar/SROA.cpp
llvm/test/Transforms/SROA/basictest.ll