mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-30 07:22:55 +01:00
7e501cf4c3
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 llvm-svn: 186280
26 lines
691 B
LLVM
26 lines
691 B
LLVM
; RUN: llc < %s -march=mipsel -mcpu=mips32r2 | FileCheck %s -check-prefix=MIPS32
|
|
; RUN: llc < %s -march=mips64el -mcpu=mips64r2 | FileCheck %s -check-prefix=MIPS64
|
|
|
|
define i32 @bswap32(i32 %x) nounwind readnone {
|
|
entry:
|
|
; MIPS32-LABEL: bswap32:
|
|
; MIPS32: wsbh $[[R0:[0-9]+]]
|
|
; MIPS32: rotr ${{[0-9]+}}, $[[R0]], 16
|
|
%or.3 = call i32 @llvm.bswap.i32(i32 %x)
|
|
ret i32 %or.3
|
|
}
|
|
|
|
define i64 @bswap64(i64 %x) nounwind readnone {
|
|
entry:
|
|
; MIPS64-LABEL: bswap64:
|
|
; MIPS64: dsbh $[[R0:[0-9]+]]
|
|
; MIPS64: dshd ${{[0-9]+}}, $[[R0]]
|
|
%or.7 = call i64 @llvm.bswap.i64(i64 %x)
|
|
ret i64 %or.7
|
|
}
|
|
|
|
declare i32 @llvm.bswap.i32(i32) nounwind readnone
|
|
|
|
declare i64 @llvm.bswap.i64(i64) nounwind readnone
|
|
|