aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/ScalarRepl/volatile.ll
blob: d506cdfbd87a16f84d4c90838db5aaf2ff3c327c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
; RUN: opt < %s -scalarrepl -S | FileCheck %s

define i32 @voltest(i32 %T) {
	%A = alloca {i32, i32}
	%B = getelementptr {i32,i32}* %A, i32 0, i32 0
	store volatile i32 %T, i32* %B
; CHECK: store volatile

	%C = getelementptr {i32,i32}* %A, i32 0, i32 1
	%X = load volatile i32* %C
; CHECK: load volatile
	ret i32 %X
}