Home | History | Annotate | Download | only in BasicAA
      1 ; RUN: opt < %s -basicaa -gvn -instcombine -S | FileCheck %s
      2 
      3 @flag0 = internal global i32 zeroinitializer
      4 @turn = internal global i32 zeroinitializer
      5 
      6 ; CHECK: ret i32 0
      7 
      8 define i32 @main() {
      9   %a = load i32* @flag0
     10   %b = atomicrmw xchg i32* @turn, i32 1 monotonic
     11   %c = load i32* @flag0
     12   %d = sub i32 %a, %c
     13   ret i32 %d
     14 }
     15