aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/coalescer-remat.ll
blob: 13fb46bffdef2b036d1cc3d4b387b9b3b17c5610 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
; RUN: llc < %s -mtriple=x86_64-apple-darwin | grep xor | count 3

@val = internal global i64 0
@"\01LC" = internal constant [7 x i8] c"0x%lx\0A\00"

define i32 @main() nounwind {
entry:
  %t0 = cmpxchg i64* @val, i64 0, i64 1 monotonic monotonic
  %0 = extractvalue { i64, i1 } %t0, 0
  %1 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([7 x i8], [7 x i8]* @"\01LC", i32 0, i64 0), i64 %0) nounwind
  ret i32 0
}

declare i32 @printf(i8*, ...) nounwind