source: icGREP/icgrep-devel/llvm-3.8.0.src/test/Analysis/BasicAA/cas.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 338 bytes
Line 
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
8define i32 @main() {
9  %a = load i32, i32* @flag0
10  %b = atomicrmw xchg i32* @turn, i32 1 monotonic
11  %c = load i32, i32* @flag0
12  %d = sub i32 %a, %c
13  ret i32 %d
14}
Note: See TracBrowser for help on using the repository browser.