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)
commit119003f2a22ee7c4f78fed5710f98edb36b237b5
tree662fda67febaeb3b6fd32d391c9ec63ea8c991ef
parentfe9dbe0066ba4a35cb68fb281e6f6649ffa85ae9
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176599 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/SimplifyCFG.cpp
test/Transforms/SimplifyCFG/volatile-phioper.ll [new file with mode: 0644]