brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · c1bc264 Raw
45 lines · plain
1; RUN: llc < %s -mtriple=mips -mcpu=mips1    | FileCheck %s -check-prefixes=ALL,MIPS12; RUN: llc < %s -mtriple=mips -mcpu=mips2    | FileCheck %s -check-prefixes=ALL,MIPS23; RUN: llc < %s -mtriple=mips -mcpu=mips32r2 | FileCheck %s -check-prefixes=ALL,MIPS324target datalayout = "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"5target triple = "mipsel-unknown-unknown-elf"6 7; Function Attrs: noinline nounwind optnone8define dso_local i32 @add_two_pointers(ptr %a, ptr %b) #0 {9entry:10; ALL-LABEL: add_two_pointers:11  %a.addr = alloca ptr, align 412  %b.addr = alloca ptr, align 413  store ptr %a, ptr %a.addr, align 414  store ptr %b, ptr %b.addr, align 415  %0 = load ptr, ptr %a.addr, align 416  %1 = load i32, ptr %0, align 417  ; ALL:        lw $1, 4($fp)18  ; MIPS1:      nop19  ; MIPS2-NOT:  nop20  ; MIPS32-NOT: nop21  ; ALL:        lw $1, 0($1)22  %2 = load ptr, ptr %b.addr, align 423  %3 = load i32, ptr %2, align 424  ; ALL:        lw $2, 0($fp)25  ; MIPS1:      nop26  ; MIPS2-NOT:  nop27  ; MIPS32-NOT: nop28  ; ALL:        lw $2, 0($2)29  %add = add nsw i32 %1, %330  ret i32 %add31  ; ALL:        lw $ra, 12($sp)32  ; MIPS1:      nop33  ; MIPS2-NOT:  nop34  ; MIPS32-NOT: nop35  ; ALL:        jr $ra36}37 38attributes #0 = { noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="-noabicalls" }39 40!llvm.module.flags = !{!0, !1}41 42!0 = !{i32 1, !"wchar_size", i32 4}43!1 = !{i32 7, !"frame-pointer", i32 2}44 45