blob: 3ff322e065cbbdd5a7b4d144eb8ebb671de7c07c [file] [log] [blame]
Dan Gohman3c7d3082009-09-11 18:01:28 +00001; RUN: opt < %s -scalarrepl -S | grep {volatile load}
2; RUN: opt < %s -scalarrepl -S | grep {volatile store}
Chris Lattner70ffe572009-01-28 20:16:43 +00003
4define i32 @voltest(i32 %T) {
5 %A = alloca {i32, i32}
6 %B = getelementptr {i32,i32}* %A, i32 0, i32 0
7 volatile store i32 %T, i32* %B
8
9 %C = getelementptr {i32,i32}* %A, i32 0, i32 1
10 %X = volatile load i32* %C
11 ret i32 %X
12}