mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
cf082ae903
This update was done with the following bash script: find test/Transforms -name "*.ll" | \ while read NAME; do echo "$NAME" if ! grep -q "^; *RUN: *llc" $NAME; then TEMP=`mktemp -t temp` cp $NAME $TEMP sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \ while read FUNC; do sed -i '' "s/;\(.*\)\([A-Za-z0-9_]*\):\( *\)@$FUNC\([( ]*\)\$/;\1\2-LABEL:\3@$FUNC(/g" $TEMP done mv $TEMP $NAME fi done llvm-svn: 186268
37 lines
738 B
LLVM
37 lines
738 B
LLVM
; RUN: opt < %s -loweratomic -S | FileCheck %s
|
|
|
|
define i8 @add() {
|
|
; CHECK-LABEL: @add(
|
|
%i = alloca i8
|
|
%j = atomicrmw add i8* %i, i8 42 monotonic
|
|
; CHECK: [[INST:%[a-z0-9]+]] = load
|
|
; CHECK-NEXT: add
|
|
; CHECK-NEXT: store
|
|
ret i8 %j
|
|
; CHECK: ret i8 [[INST]]
|
|
}
|
|
|
|
define i8 @nand() {
|
|
; CHECK-LABEL: @nand(
|
|
%i = alloca i8
|
|
%j = atomicrmw nand i8* %i, i8 42 monotonic
|
|
; CHECK: [[INST:%[a-z0-9]+]] = load
|
|
; CHECK-NEXT: and
|
|
; CHECK-NEXT: xor
|
|
; CHECK-NEXT: store
|
|
ret i8 %j
|
|
; CHECK: ret i8 [[INST]]
|
|
}
|
|
|
|
define i8 @min() {
|
|
; CHECK-LABEL: @min(
|
|
%i = alloca i8
|
|
%j = atomicrmw min i8* %i, i8 42 monotonic
|
|
; CHECK: [[INST:%[a-z0-9]+]] = load
|
|
; CHECK-NEXT: icmp
|
|
; CHECK-NEXT: select
|
|
; CHECK-NEXT: store
|
|
ret i8 %j
|
|
; CHECK: ret i8 [[INST]]
|
|
}
|