source: icGREP/icgrep-devel/llvm-3.8.0.src/test/CodeGen/ARM/atomicrmw_minmax.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: 550 bytes
Line 
1; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a9 %s -o - | FileCheck %s
2
3;  CHECK-LABEL: max:
4define i32 @max(i8 %ctx, i32* %ptr, i32 %val)
5{
6;  CHECK: ldrex
7;  CHECK: cmp [[old:r[0-9]*]], [[val:r[0-9]*]]
8;  CHECK: movhi {{r[0-9]*}}, [[old]]
9  %old = atomicrmw umax i32* %ptr, i32 %val monotonic
10  ret i32 %old
11}
12
13;  CHECK-LABEL: min:
14define i32 @min(i8 %ctx, i32* %ptr, i32 %val)
15{
16;  CHECK: ldrex
17;  CHECK: cmp [[old:r[0-9]*]], [[val:r[0-9]*]]
18;  CHECK: movls {{r[0-9]*}}, [[old]]
19  %old = atomicrmw umin i32* %ptr, i32 %val monotonic
20  ret i32 %old
21}
Note: See TracBrowser for help on using the repository browser.