diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-12-21 03:04:10 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-12-21 03:04:10 +0000 |
commit | dc8a1aaea6dd23150f2771b05ea73a1b8e81e279 (patch) | |
tree | 458c1c1691384544a550daf4d5a9afab3d41e825 /llvm/test/CodeGen/ARM/atomic-op.ll | |
parent | 242ad89a15d5466d166d47978bfff983d40ab511 (diff) | |
download | bcm5719-llvm-dc8a1aaea6dd23150f2771b05ea73a1b8e81e279.tar.gz bcm5719-llvm-dc8a1aaea6dd23150f2771b05ea73a1b8e81e279.zip |
Fix a couple of copy-n-paste bugs. Noticed by George Russell.
llvm-svn: 147032
Diffstat (limited to 'llvm/test/CodeGen/ARM/atomic-op.ll')
-rw-r--r-- | llvm/test/CodeGen/ARM/atomic-op.ll | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/llvm/test/CodeGen/ARM/atomic-op.ll b/llvm/test/CodeGen/ARM/atomic-op.ll index 02ce5a14691..37eec8e1af2 100644 --- a/llvm/test/CodeGen/ARM/atomic-op.ll +++ b/llvm/test/CodeGen/ARM/atomic-op.ll @@ -1,5 +1,5 @@ -; RUN: llc < %s -mtriple=armv7-apple-darwin10 -verify-machineinstrs | FileCheck %s -; RUN: llc < %s -mtriple=thumbv7-apple-darwin10 -verify-machineinstrs | FileCheck %s +; RUN: llc < %s -mtriple=armv7-apple-ios -verify-machineinstrs | FileCheck %s +; RUN: llc < %s -mtriple=thumbv7-apple-ios -verify-machineinstrs | FileCheck %s define void @func(i32 %argc, i8** %argv) nounwind { entry: @@ -61,7 +61,7 @@ entry: ; CHECK: strex %7 = atomicrmw min i32* %val2, i32 16 monotonic store i32 %7, i32* %old - %neg = sub i32 0, 1 ; <i32> [#uses=1] + %neg = sub i32 0, 1 ; CHECK: ldrex ; CHECK: cmp ; CHECK: strex @@ -77,5 +77,27 @@ entry: ; CHECK: strex %10 = atomicrmw max i32* %val2, i32 0 monotonic store i32 %10, i32* %old - ret void + ; CHECK: ldrex + ; CHECK: cmp + ; CHECK: strex + %11 = atomicrmw umin i32* %val2, i32 16 monotonic + store i32 %11, i32* %old + %uneg = sub i32 0, 1 + ; CHECK: ldrex + ; CHECK: cmp + ; CHECK: strex + %12 = atomicrmw umin i32* %val2, i32 %uneg monotonic + store i32 %12, i32* %old + ; CHECK: ldrex + ; CHECK: cmp + ; CHECK: strex + %13 = atomicrmw umax i32* %val2, i32 1 monotonic + store i32 %13, i32* %old + ; CHECK: ldrex + ; CHECK: cmp + ; CHECK: strex + %14 = atomicrmw umax i32* %val2, i32 0 monotonic + store i32 %14, i32* %old + + ret void } |