1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
llvm-mirror/test/Transforms/FunctionAttrs/2010-10-30-volatile.ll
Duncan Sands a7198342e7 If a function does a volatile load from a global constant, do not
consider it to be readonly.  In fact, don't even consider it to be
readonly if it does a volatile load from an AllocaInst either (it
is debatable as to whether readonly would be correct or not in this
case; play safe for the moment).  This fixes PR8279.

llvm-svn: 117783
2010-10-30 12:59:44 +00:00

11 lines
168 B
LLVM

; RUN: opt < %s -functionattrs -S | FileCheck %s
; PR8279
@g = constant i32 1
define void @foo() {
; CHECK: void @foo() {
%tmp = volatile load i32* @g
ret void
}