2013-02-14 06:00:37 +08:00
|
|
|
; RUN: opt < %s -scalarrepl -S | FileCheck %s
|
2009-01-29 04:16:43 +08:00
|
|
|
|
|
|
|
define i32 @voltest(i32 %T) {
|
|
|
|
%A = alloca {i32, i32}
|
|
|
|
%B = getelementptr {i32,i32}* %A, i32 0, i32 0
|
2011-11-27 14:54:59 +08:00
|
|
|
store volatile i32 %T, i32* %B
|
2013-02-14 06:00:37 +08:00
|
|
|
; CHECK: store volatile
|
2009-01-29 04:16:43 +08:00
|
|
|
|
|
|
|
%C = getelementptr {i32,i32}* %A, i32 0, i32 1
|
2011-11-27 14:54:59 +08:00
|
|
|
%X = load volatile i32* %C
|
2013-02-14 06:00:37 +08:00
|
|
|
; CHECK: load volatile
|
2009-01-29 04:16:43 +08:00
|
|
|
ret i32 %X
|
|
|
|
}
|