mirror of
https://github.com/RPCS3/llvm.git
synced 2026-01-31 01:25:19 +01:00
This update was done with the following bash script:
find test/CodeGen -name "*.ll" | \
while read NAME; do
echo "$NAME"
if ! grep -q "^; *RUN: *llc.*debug" $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
sed -i '' "s/;\(.*\)-LABEL-LABEL:/;\1-LABEL:/" $TEMP
sed -i '' "s/;\(.*\)-NEXT-LABEL:/;\1-NEXT:/" $TEMP
sed -i '' "s/;\(.*\)-NOT-LABEL:/;\1-NOT:/" $TEMP
sed -i '' "s/;\(.*\)-DAG-LABEL:/;\1-DAG:/" $TEMP
mv $TEMP $NAME
fi
done
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186280 91177308-0d34-0410-b5e6-96231b3b80d8
34 lines
851 B
LLVM
34 lines
851 B
LLVM
; RUN: llc < %s -mtriple=armv7-apple-darwin | FileCheck %s
|
|
; RUN: llc < %s -mtriple=thumbv7-apple-darwin | FileCheck %s
|
|
|
|
%0 = type { i32, i32 }
|
|
|
|
; CHECK-LABEL: f0:
|
|
; CHECK: ldrexd
|
|
define i64 @f0(i8* %p) nounwind readonly {
|
|
entry:
|
|
%ldrexd = tail call %0 @llvm.arm.ldrexd(i8* %p)
|
|
%0 = extractvalue %0 %ldrexd, 1
|
|
%1 = extractvalue %0 %ldrexd, 0
|
|
%2 = zext i32 %0 to i64
|
|
%3 = zext i32 %1 to i64
|
|
%shl = shl nuw i64 %2, 32
|
|
%4 = or i64 %shl, %3
|
|
ret i64 %4
|
|
}
|
|
|
|
; CHECK-LABEL: f1:
|
|
; CHECK: strexd
|
|
define i32 @f1(i8* %ptr, i64 %val) nounwind {
|
|
entry:
|
|
%tmp4 = trunc i64 %val to i32
|
|
%tmp6 = lshr i64 %val, 32
|
|
%tmp7 = trunc i64 %tmp6 to i32
|
|
%strexd = tail call i32 @llvm.arm.strexd(i32 %tmp4, i32 %tmp7, i8* %ptr)
|
|
ret i32 %strexd
|
|
}
|
|
|
|
declare %0 @llvm.arm.ldrexd(i8*) nounwind readonly
|
|
declare i32 @llvm.arm.strexd(i32, i32, i8*) nounwind
|
|
|