1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -O0 -mtriple=mipsel-linux-gnu -global-isel -verify-machineinstrs %s -o -| FileCheck %s -check-prefixes=MIPS32
4 define i32 @load_i32(i32* %ptr) {
5 ; MIPS32-LABEL: load_i32:
6 ; MIPS32: # %bb.0: # %entry
7 ; MIPS32-NEXT: lw $2, 0($4)
11 %0 = load i32, i32* %ptr
15 define i64 @load_i64(i64* %ptr) {
16 ; MIPS32-LABEL: load_i64:
17 ; MIPS32: # %bb.0: # %entry
18 ; MIPS32-NEXT: lw $2, 0($4)
19 ; MIPS32-NEXT: ori $1, $zero, 4
20 ; MIPS32-NEXT: addu $1, $4, $1
21 ; MIPS32-NEXT: lw $3, 0($1)
25 %0 = load i64, i64* %ptr
29 define void @load_ambiguous_i64_in_fpr(i64* %i64_ptr_a, i64* %i64_ptr_b) {
30 ; MIPS32-LABEL: load_ambiguous_i64_in_fpr:
31 ; MIPS32: # %bb.0: # %entry
32 ; MIPS32-NEXT: ldc1 $f0, 0($4)
33 ; MIPS32-NEXT: sdc1 $f0, 0($5)
37 %0 = load i64, i64* %i64_ptr_a
38 store i64 %0, i64* %i64_ptr_b
42 define float @load_float(float* %ptr) {
43 ; MIPS32-LABEL: load_float:
44 ; MIPS32: # %bb.0: # %entry
45 ; MIPS32-NEXT: lwc1 $f0, 0($4)
49 %0 = load float, float* %ptr
53 define void @load_ambiguous_float_in_gpr(float* %float_ptr_a, float* %float_ptr_b) {
54 ; MIPS32-LABEL: load_ambiguous_float_in_gpr:
55 ; MIPS32: # %bb.0: # %entry
56 ; MIPS32-NEXT: lw $1, 0($4)
57 ; MIPS32-NEXT: sw $1, 0($5)
61 %0 = load float, float* %float_ptr_a
62 store float %0, float* %float_ptr_b
66 define double @load_double(double* %ptr) {
67 ; MIPS32-LABEL: load_double:
68 ; MIPS32: # %bb.0: # %entry
69 ; MIPS32-NEXT: ldc1 $f0, 0($4)
73 %0 = load double, double* %ptr