llvm/test/CodeGen/Mips/setcc-se.ll
Stephen Lin 8b2b8a1835 Mass update to CodeGen tests to use CHECK-LABEL for labels corresponding to function definitions for more informative error messages. No functionality change and all updated tests passed locally.
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
2013-07-14 06:24:09 +00:00

156 lines
2.6 KiB
LLVM

; RUN: llc -march=mipsel < %s | FileCheck %s
@g1 = external global i32
; CHECK-LABEL: seteq0:
; CHECK: sltiu ${{[0-9]+}}, $4, 1
define i32 @seteq0(i32 %a) {
entry:
%cmp = icmp eq i32 %a, 0
%conv = zext i1 %cmp to i32
ret i32 %conv
}
; CHECK-LABEL: setne0:
; CHECK: sltu ${{[0-9]+}}, $zero, $4
define i32 @setne0(i32 %a) {
entry:
%cmp = icmp ne i32 %a, 0
%conv = zext i1 %cmp to i32
ret i32 %conv
}
; CHECK-LABEL: slti_beq0:
; CHECK: slti $[[R0:[0-9]+]], $4, -32768
; CHECK: beq $[[R0]], $zero
define void @slti_beq0(i32 %a) {
entry:
%cmp = icmp slt i32 %a, -32768
br i1 %cmp, label %if.then, label %if.end
if.then:
store i32 %a, i32* @g1, align 4
br label %if.end
if.end:
ret void
}
; CHECK-LABEL: slti_beq1:
; CHECK: slt ${{[0-9]+}}
define void @slti_beq1(i32 %a) {
entry:
%cmp = icmp slt i32 %a, -32769
br i1 %cmp, label %if.then, label %if.end
if.then:
store i32 %a, i32* @g1, align 4
br label %if.end
if.end:
ret void
}
; CHECK-LABEL: slti_beq2:
; CHECK: slti $[[R0:[0-9]+]], $4, 32767
; CHECK: beq $[[R0]], $zero
define void @slti_beq2(i32 %a) {
entry:
%cmp = icmp slt i32 %a, 32767
br i1 %cmp, label %if.then, label %if.end
if.then:
store i32 %a, i32* @g1, align 4
br label %if.end
if.end:
ret void
}
; CHECK-LABEL: slti_beq3:
; CHECK: slt ${{[0-9]+}}
define void @slti_beq3(i32 %a) {
entry:
%cmp = icmp slt i32 %a, 32768
br i1 %cmp, label %if.then, label %if.end
if.then:
store i32 %a, i32* @g1, align 4
br label %if.end
if.end:
ret void
}
; CHECK-LABEL: sltiu_beq0:
; CHECK: sltiu $[[R0:[0-9]+]], $4, 32767
; CHECK: beq $[[R0]], $zero
define void @sltiu_beq0(i32 %a) {
entry:
%cmp = icmp ult i32 %a, 32767
br i1 %cmp, label %if.then, label %if.end
if.then:
store i32 %a, i32* @g1, align 4
br label %if.end
if.end:
ret void
}
; CHECK-LABEL: sltiu_beq1:
; CHECK: sltu ${{[0-9]+}}
define void @sltiu_beq1(i32 %a) {
entry:
%cmp = icmp ult i32 %a, 32768
br i1 %cmp, label %if.then, label %if.end
if.then:
store i32 %a, i32* @g1, align 4
br label %if.end
if.end:
ret void
}
; CHECK-LABEL: sltiu_beq2:
; CHECK: sltiu $[[R0:[0-9]+]], $4, -32768
; CHECK: beq $[[R0]], $zero
define void @sltiu_beq2(i32 %a) {
entry:
%cmp = icmp ult i32 %a, -32768
br i1 %cmp, label %if.then, label %if.end
if.then:
store i32 %a, i32* @g1, align 4
br label %if.end
if.end:
ret void
}
; CHECK-LABEL: sltiu_beq3:
; CHECK: sltu ${{[0-9]+}}
define void @sltiu_beq3(i32 %a) {
entry:
%cmp = icmp ult i32 %a, -32769
br i1 %cmp, label %if.then, label %if.end
if.then:
store i32 %a, i32* @g1, align 4
br label %if.end
if.end:
ret void
}