1 ; RUN: opt -basicaa -functionattrs -S < %s | FileCheck %s
3 ; Atomic load/store to local doesn't affect whether a function is
5 define i32 @test1(i32 %x) uwtable ssp {
6 ; CHECK: define i32 @test1(i32 %x) #0 {
8 %x.addr = alloca i32, align 4
9 store atomic i32 %x, i32* %x.addr seq_cst, align 4
10 %r = load atomic i32* %x.addr seq_cst, align 4
14 ; A function with an Acquire load is not readonly.
15 define i32 @test2(i32* %x) uwtable ssp {
16 ; CHECK: define i32 @test2(i32* nocapture readonly %x) #1 {
18 %r = load atomic i32* %x seq_cst, align 4
22 ; CHECK: attributes #0 = { readnone ssp uwtable }
23 ; CHECK: attributes #1 = { ssp uwtable }