reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=mips-mti-linux-gnu -mcpu=mips32r2 -mattr=+dsp < %s | FileCheck %s --check-prefix=DSP
; RUN: llc -mtriple=mips-mti-linux-gnu -mcpu=mips32r2 -mattr=+dsp,+micromips < %s | FileCheck %s --check-prefix=MMDSP

define i64 @n(i64 %a, i64 %b) {
; DSP-LABEL: n:
; DSP:       # %bb.0: # %entry
; DSP-NEXT:    addsc $3, $7, $5
; DSP-NEXT:    addwc $2, $6, $4
; DSP-NEXT:    jr $ra
; DSP-NEXT:    nop
;
; MMDSP-LABEL: n:
; MMDSP:       # %bb.0: # %entry
; MMDSP-NEXT:    addsc $3, $7, $5
; MMDSP-NEXT:    addwc $2, $6, $4
; MMDSP-NEXT:    jrc $ra
entry:
  %add = add i64 %b, %a
  ret i64 %add
}

define i128 @m(i128 zeroext %a, i128 zeroext %b) {
; DSP-LABEL: m:
; DSP:       # %bb.0: # %entry
; DSP-NEXT:    lw $1, 28($sp)
; DSP-NEXT:    lw $2, 24($sp)
; DSP-NEXT:    addsc $1, $1, $7
; DSP-NEXT:    addwc $6, $2, $6
; DSP-NEXT:    rddsp $2, 1
; DSP-NEXT:    ext $3, $2, 20, 1
; DSP-NEXT:    ins $3, $2, 6, 1
; DSP-NEXT:    ins $3, $zero, 20, 1
; DSP-NEXT:    lw $2, 20($sp)
; DSP-NEXT:    wrdsp $3, 1
; DSP-NEXT:    addwc $3, $2, $5
; DSP-NEXT:    rddsp $2, 1
; DSP-NEXT:    ext $5, $2, 20, 1
; DSP-NEXT:    lw $7, 16($sp)
; DSP-NEXT:    ins $5, $2, 6, 1
; DSP-NEXT:    ins $5, $zero, 20, 1
; DSP-NEXT:    wrdsp $5, 1
; DSP-NEXT:    addwc $2, $7, $4
; DSP-NEXT:    move $4, $6
; DSP-NEXT:    jr $ra
; DSP-NEXT:    move $5, $1
;
; MMDSP-LABEL: m:
; MMDSP:       # %bb.0: # %entry
; MMDSP-NEXT:    lw $1, 28($sp)
; MMDSP-NEXT:    lw $2, 24($sp)
; MMDSP-NEXT:    addsc $1, $1, $7
; MMDSP-NEXT:    addwc $6, $2, $6
; MMDSP-NEXT:    rddsp $2, 1
; MMDSP-NEXT:    ext $3, $2, 20, 1
; MMDSP-NEXT:    ins $3, $2, 6, 1
; MMDSP-NEXT:    ins $3, $zero, 20, 1
; MMDSP-NEXT:    lw $2, 20($sp)
; MMDSP-NEXT:    wrdsp $3, 1
; MMDSP-NEXT:    addwc $3, $2, $5
; MMDSP-NEXT:    rddsp $2, 1
; MMDSP-NEXT:    ext $5, $2, 20, 1
; MMDSP-NEXT:    lw $7, 16($sp)
; MMDSP-NEXT:    ins $5, $2, 6, 1
; MMDSP-NEXT:    ins $5, $zero, 20, 1
; MMDSP-NEXT:    wrdsp $5, 1
; MMDSP-NEXT:    addwc $2, $7, $4
; MMDSP-NEXT:    move $4, $6
; MMDSP-NEXT:    move $5, $1
; MMDSP-NEXT:    jrc $ra
entry:
  %add = add i128 %b, %a
  ret i128 %add
}