1*9880d681SAndroid Build Coastguard Worker; RUN: opt -mem2reg < %s -S | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker; mem2reg is allowed with arbitrary atomic operations (although we only support 4*9880d681SAndroid Build Coastguard Worker; it for atomic load and store at the moment). 5*9880d681SAndroid Build Coastguard Workerdefine i32 @test1(i32 %x) { 6*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @test1( 7*9880d681SAndroid Build Coastguard Worker; CHECK: ret i32 %x 8*9880d681SAndroid Build Coastguard Worker %a = alloca i32 9*9880d681SAndroid Build Coastguard Worker store atomic i32 %x, i32* %a seq_cst, align 4 10*9880d681SAndroid Build Coastguard Worker %r = load atomic i32, i32* %a seq_cst, align 4 11*9880d681SAndroid Build Coastguard Worker ret i32 %r 12*9880d681SAndroid Build Coastguard Worker} 13