llvm-6502/test/CodeGen/Mips/mips1f64ldst.ll
Akira Hatanaka a43d3e71ec Add test case for r137711.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137725 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-16 17:32:01 +00:00

37 lines
1.3 KiB
LLVM

; RUN: llc < %s -march=mipsel | FileCheck %s -check-prefix=CHECK-EL
; RUN: llc < %s -march=mips | FileCheck %s -check-prefix=CHECK-EB
@g1 = common global double 0.000000e+00, align 8
@g2 = common global double 0.000000e+00, align 8
define double @foo0(double %d0) nounwind {
entry:
; CHECK-EL: lw $[[R0:[0-9]+]], %got($CPI0_0)
; CHECK-EL: lwc1 $f[[R1:[0-9]+]], %lo($CPI0_0)($[[R0]])
; CHECK-EL: lwc1 $f{{[0-9]+}}, %lo($CPI0_0+4)($[[R0]])
; CHECK-EL: add.d $f[[R2:[0-9]+]], $f12, $f[[R1]]
; CHECK-EL: lw $[[R3:[0-9]+]], %got(g1)
; CHECK-EL: swc1 $f[[R2]], 0($[[R3]])
; CHECK-EL: swc1 $f{{[0-9]+}}, 4($[[R3]])
; CHECK-EL: lw $[[R4:[0-9]+]], %got(g2)
; CHECK-EL: lwc1 $f0, 0($[[R4]])
; CHECK-EL: lwc1 $f1, 4($[[R4]])
; CHECK-EB: lw $[[R0:[0-9]+]], %got($CPI0_0)
; CHECK-EB: lwc1 $f{{[0-9]+}}, %lo($CPI0_0)($[[R0]])
; CHECK-EB: lwc1 $f[[R1:[0-9]+]], %lo($CPI0_0+4)($[[R0]])
; CHECK-EB: add.d $f[[R2:[0-9]+]], $f12, $f[[R1]]
; CHECK-EB: lw $[[R3:[0-9]+]], %got(g1)
; CHECK-EB: swc1 $f{{[0-9]+}}, 0($[[R3]])
; CHECK-EB: swc1 $f[[R2]], 4($[[R3]])
; CHECK-EB: lw $[[R4:[0-9]+]], %got(g2)
; CHECK-EB: lwc1 $f1, 0($[[R4]])
; CHECK-EB: lwc1 $f0, 4($[[R4]])
%add = fadd double %d0, 2.000000e+00
store double %add, double* @g1, align 8
%tmp1 = load double* @g2, align 8
ret double %tmp1
}