1; ModuleID = 'loadstore2.c' 2target datalayout = "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64" 3target triple = "mips--linux-gnu" 4 5@c2 = common global i8 0, align 1 6@c1 = common global i8 0, align 1 7; RUN: llc -march=mipsel -relocation-model=pic -O0 -mips-fast-isel -fast-isel-abort -mcpu=mips32r2 \ 8; RUN: < %s | FileCheck %s 9 10@s2 = common global i16 0, align 2 11@s1 = common global i16 0, align 2 12@i2 = common global i32 0, align 4 13@i1 = common global i32 0, align 4 14@f2 = common global float 0.000000e+00, align 4 15@f1 = common global float 0.000000e+00, align 4 16@d2 = common global double 0.000000e+00, align 8 17@d1 = common global double 0.000000e+00, align 8 18 19; Function Attrs: nounwind 20define void @cfoo() #0 { 21entry: 22 %0 = load i8* @c2, align 1 23 store i8 %0, i8* @c1, align 1 24; CHECK-LABEL: cfoo: 25; CHECK: lbu $[[REGc:[0-9]+]], 0(${{[0-9]+}}) 26; CHECK: sb $[[REGc]], 0(${{[0-9]+}}) 27 28 29 ret void 30} 31 32; Function Attrs: nounwind 33define void @sfoo() #0 { 34entry: 35 %0 = load i16* @s2, align 2 36 store i16 %0, i16* @s1, align 2 37; CHECK-LABEL: sfoo: 38; CHECK: lhu $[[REGs:[0-9]+]], 0(${{[0-9]+}}) 39; CHECK: sh $[[REGs]], 0(${{[0-9]+}}) 40 41 ret void 42} 43 44; Function Attrs: nounwind 45define void @ifoo() #0 { 46entry: 47 %0 = load i32* @i2, align 4 48 store i32 %0, i32* @i1, align 4 49; CHECK-LABEL: ifoo: 50; CHECK: lw $[[REGi:[0-9]+]], 0(${{[0-9]+}}) 51; CHECK: sw $[[REGi]], 0(${{[0-9]+}}) 52 53 ret void 54} 55 56; Function Attrs: nounwind 57define void @ffoo() #0 { 58entry: 59 %0 = load float* @f2, align 4 60 store float %0, float* @f1, align 4 61; CHECK-LABEL: ffoo: 62; CHECK: lwc1 $f[[REGf:[0-9]+]], 0(${{[0-9]+}}) 63; CHECK: swc1 $f[[REGf]], 0(${{[0-9]+}}) 64 65 66 ret void 67} 68 69; Function Attrs: nounwind 70define void @dfoo() #0 { 71entry: 72 %0 = load double* @d2, align 8 73 store double %0, double* @d1, align 8 74; CHECK-LABEL: dfoo: 75; CHECK: ldc1 $f[[REGd:[0-9]+]], 0(${{[0-9]+}}) 76; CHECK: sdc1 $f[[REGd]], 0(${{[0-9]+}}) 77; CHECK: .end dfoo 78 ret void 79} 80 81attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } 82 83 84