SimplifyCFG fix for volatile load/store.
authorAndrew Trick <atrick@apple.com>
Thu, 7 Mar 2013 01:03:35 +0000 (01:03 +0000)
committerAndrew Trick <atrick@apple.com>
Thu, 7 Mar 2013 01:03:35 +0000 (01:03 +0000)
commita0a5ca06b93de599cee296878c867ebccafb4eb2
tree1f56c416cbf1d240f22ab21de3785034e3b851f7
parentd5cac37dc54bc2f10ca0300fa86cfdd1313bb212
SimplifyCFG fix for volatile load/store.

Fixes rdar:13349374.

Volatile loads and stores need to be preserved even if the language
standard says they are undefined. "volatile" in this context means "get
out of the way compiler, let my platform handle it".

Additionally, this is the only way I know of with llvm to write to the
first page (when hardware allows) without dropping to assembly.

llvm-svn: 176599
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/test/Transforms/SimplifyCFG/volatile-phioper.ll [new file with mode: 0644]