X86: Stop LEA64_32r doing unspeakable things to its arguments.
[oota-llvm.git] / test / CodeGen / Mips / mno-ldc1-sdc1.ll
1 ; RUN: llc -march=mipsel -relocation-model=pic -mno-ldc1-sdc1 < %s | \
2 ; RUN: FileCheck %s -check-prefix=LE-PIC
3 ; RUN: llc -march=mipsel -relocation-model=static -mno-ldc1-sdc1 < %s | \
4 ; RUN: FileCheck %s -check-prefix=LE-STATIC
5 ; RUN: llc -march=mips -relocation-model=pic -mno-ldc1-sdc1 < %s | \
6 ; RUN: FileCheck %s -check-prefix=BE-PIC
7 ; RUN: llc -march=mipsel < %s | FileCheck %s -check-prefix=CHECK-LDC1-SDC1
8
9 @g0 = common global double 0.000000e+00, align 8
10
11 ; LE-PIC: test_ldc1:
12 ; LE-PIC: lwc1 $f0, 0(${{[0-9]+}})
13 ; LE-PIC: lwc1 $f1, 4(${{[0-9]+}})
14 ; LE-STATIC: test_ldc1:
15 ; LE-STATIC: lwc1 $f0, %lo(g0)(${{[0-9]+}})
16 ; LE-STATIC: lwc1 $f1, %lo(g0+4)(${{[0-9]+}})
17 ; BE-PIC: test_ldc1:
18 ; BE-PIC: lwc1 $f1, 0(${{[0-9]+}})
19 ; BE-PIC: lwc1 $f0, 4(${{[0-9]+}})
20 ; CHECK-LDC1-SDC1: test_ldc1:
21 ; CHECK-LDC1-SDC1: ldc1 $f{{[0-9]+}}
22
23 define double @test_ldc1() {
24 entry:
25   %0 = load double* @g0, align 8
26   ret double %0
27 }
28
29 ; LE-PIC: test_sdc1:
30 ; LE-PIC: swc1 $f12, 0(${{[0-9]+}})
31 ; LE-PIC: swc1 $f13, 4(${{[0-9]+}})
32 ; LE-STATIC: test_sdc1:
33 ; LE-STATIC: swc1 $f12, %lo(g0)(${{[0-9]+}})
34 ; LE-STATIC: swc1 $f13, %lo(g0+4)(${{[0-9]+}})
35 ; BE-PIC: test_sdc1:
36 ; BE-PIC: swc1 $f13, 0(${{[0-9]+}})
37 ; BE-PIC: swc1 $f12, 4(${{[0-9]+}})
38 ; CHECK-LDC1-SDC1: test_sdc1:
39 ; CHECK-LDC1-SDC1: sdc1 $f{{[0-9]+}}
40
41 define void @test_sdc1(double %a) {
42 entry:
43   store double %a, double* @g0, align 8
44   ret void
45 }