]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/Transforms/ScalarRepl/volatile.ll
Vendor import of llvm trunk r135360:
[FreeBSD/FreeBSD.git] / test / Transforms / ScalarRepl / volatile.ll
1 ; RUN: opt < %s -scalarrepl -S | grep {volatile load}
2 ; RUN: opt < %s -scalarrepl -S | grep {volatile store}
3
4 define 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 }