X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2FCodeGen%2FX86%2Fcoalescer-remat.ll;h=62e0562fd500f31792c45121dc190a72c1725342;hb=39cf5554292b7a82552b704c3905ab9e7557a9db;hp=ab029f45658ce538f4406bdda07f080ab4f65cbf;hpb=20580a1cf658388f357d58a71ac81e4167acc34f;p=oota-llvm.git diff --git a/test/CodeGen/X86/coalescer-remat.ll b/test/CodeGen/X86/coalescer-remat.ll index ab029f45658..62e0562fd50 100644 --- a/test/CodeGen/X86/coalescer-remat.ll +++ b/test/CodeGen/X86/coalescer-remat.ll @@ -1,15 +1,14 @@ -; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin | grep xor | count 3 +; RUN: llc < %s -mtriple=x86_64-apple-darwin | grep xor | count 3 -@val = internal global i64 0 ; [#uses=1] -@"\01LC" = internal constant [7 x i8] c"0x%lx\0A\00" ; <[7 x i8]*> [#uses=1] +@val = internal global i64 0 +@"\01LC" = internal constant [7 x i8] c"0x%lx\0A\00" define i32 @main() nounwind { entry: - %0 = tail call i64 @llvm.atomic.cmp.swap.i64.p0i64(i64* @val, i64 0, i64 1) ; [#uses=1] - %1 = tail call i32 (i8*, ...)* @printf(i8* getelementptr ([7 x i8]* @"\01LC", i32 0, i64 0), i64 %0) nounwind ; [#uses=0] - ret i32 0 + %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 i64 @llvm.atomic.cmp.swap.i64.p0i64(i64*, i64, i64) nounwind - declare i32 @printf(i8*, ...) nounwind