Home | History | Annotate | Download | only in GlobalOpt
      1 ; RUN: opt -globalopt < %s -S -o - | FileCheck %s
      2 
      3 @GV1 = internal global i64 1
      4 @GV2 = internal global i32 0
      5 
      6 ; CHECK: @GV1 = internal unnamed_addr constant i64 1
      7 ; CHECK: @GV2 = internal unnamed_addr global i32 0
      8 
      9 define void @test1() {
     10 entry:
     11   %0 = load atomic i8, i8* bitcast (i64* @GV1 to i8*) acquire, align 8
     12   ret void
     13 }
     14 
     15 ; PR17163
     16 define void @test2a() {
     17 entry:
     18   store atomic i32 10, i32* @GV2 seq_cst, align 4
     19   ret void
     20 }
     21 define i32 @test2b() {
     22 entry:
     23   %atomic-load = load atomic i32, i32* @GV2 seq_cst, align 4
     24   ret i32 %atomic-load
     25 }
     26