blob: 982c41318b105b0538af72493663a07500e0945d [file] [log] [blame]
Eli Friedmanfd06b3c2011-08-15 23:55:52 +00001; RUN: opt -mem2reg < %s -S | FileCheck %s
2
3; mem2reg is allowed with arbitrary atomic operations (although we only support
4; it for atomic load and store at the moment).
5define i32 @test1(i32 %x) {
6; CHECK: @test1
7; CHECK: ret i32 %x
8 %a = alloca i32
9 store atomic i32 %x, i32* %a seq_cst, align 4
10 %r = load atomic i32* %a seq_cst, align 4
11 ret i32 %r
12}