blob: ab276b043e3aed8fac2bd6f3cea27d897a55aa10 [file] [log] [blame]
Eli Friedmanf03bb262011-08-12 22:50:01 +00001; RUN: opt < %s -scalarrepl -S | grep {load volatile}
2; RUN: opt < %s -scalarrepl -S | grep {store volatile}
Chris Lattner6e733d32009-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}