Eli Friedman | fd06b3c | 2011-08-15 23:55:52 +0000 | [diff] [blame] | 1 | ; 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). | ||||
5 | define 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 | } |