; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
; RUN: llc %s -O0 -march=sparc -mcpu=ut699 -o - | FileCheck %s
; RUN: llc %s -O0 -march=sparc -mcpu=leon3 -mattr=+insertnopload -o - | FileCheck %s
define float @ld_float_test() #0 {
; CHECK-LABEL: ld_float_test:
; CHECK: .cfi_startproc
; CHECK-NEXT: ! %bb.0: ! %entry
; CHECK-NEXT: add %sp, -96, %sp
; CHECK-NEXT: .cfi_def_cfa_register %fp
; CHECK-NEXT: .cfi_window_save
; CHECK-NEXT: .cfi_register %o7, %i7
; CHECK-NEXT: sethi 1042305, %o0
; CHECK-NEXT: or %o0, 25, %o0
; CHECK-NEXT: st %o0, [%sp+92]
; CHECK-NEXT: sethi %hi(.LCPI0_0), %o0
; CHECK-NEXT: ld [%o0+%lo(.LCPI0_0)], %f0
; CHECK-NEXT: nop
; CHECK-NEXT: retl
; CHECK-NEXT: add %sp, 96, %sp
entry:
%f = alloca float, align 4
store float 0x3FF3C08320000000, ptr %f, align 4
%0 = load float, ptr %f, align 4
ret float %0
}
define i32 @ld_i32_test(ptr %p) {
; CHECK-LABEL: ld_i32_test:
; CHECK: .cfi_startproc
; CHECK-NEXT: ! %bb.0:
; CHECK-NEXT: ld [%o0], %o0
; CHECK-NEXT: nop
; CHECK-NEXT: retl
; CHECK-NEXT: nop
%res = load i32, ptr %p
ret i32 %res
}