From: Duncan P. N. Exon Smith Date: Sun, 7 Feb 2016 05:06:35 +0000 (+0000) Subject: LangRef: Fix example code for cmpxchg X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c917c7a7b19ffe618ded71b83d70f8abe68f4114;p=platform%2Fupstream%2Fllvm.git LangRef: Fix example code for cmpxchg Patch by Daniel Robertson! llvm-svn: 260018 --- diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index 307a763..191c7e8 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -7114,11 +7114,11 @@ Example: .. code-block:: llvm entry: - %orig = atomic load i32, i32* %ptr unordered ; yields i32 + %orig = load atomic i32, i32* %ptr unordered, align 4 ; yields i32 br label %loop loop: - %cmp = phi i32 [ %orig, %entry ], [%old, %loop] + %cmp = phi i32 [ %orig, %entry ], [%value_loaded, %loop] %squared = mul i32 %cmp, %cmp %val_success = cmpxchg i32* %ptr, i32 %cmp, i32 %squared acq_rel monotonic ; yields { i32, i1 } %value_loaded = extractvalue { i32, i1 } %val_success, 0