Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/SPARC/64spill.ll
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

117 lines
4.9 KiB
LLVM

; RUN: llc < %s -mtriple=sparcv9 | FileCheck %s
target datalayout = "E-i64:64-n32:64-S128"
target triple = "sparc64-sun-sparc"
; CHECK-LABEL: test_and_spill
; CHECK: and %i0, %i1, [[R:%[gilo][0-7]]]
; CHECK: stx [[R]], [%fp+{{.+}}]
; CHECK: ldx [%fp+{{.+}}, %i0
define i64 @test_and_spill(i64 %a, i64 %b) {
entry:
%r0 = and i64 %a, %b
%0 = tail call i64 asm sideeffect "#$0 $1", "=r,r,~{i0},~{i1},~{i2},~{i3},~{i4},~{i5},~{i6},~{i7},~{g1},~{g2},~{g3},~{g4},~{g5},~{g6},~{g7},~{l0},~{l1},~{l2},~{l3},~{l4},~{l5},~{l6},~{l7},~{o0},~{o1},~{o2},~{o3},~{o4},~{o5},~{o6}"(i64 %r0)
ret i64 %r0
}
; CHECK-LABEL: test_or_spill
; CHECK: or %i0, %i1, [[R:%[gilo][0-7]]]
; CHECK: stx [[R]], [%fp+{{.+}}]
; CHECK: ldx [%fp+{{.+}}, %i0
define i64 @test_or_spill(i64 %a, i64 %b) {
entry:
%r0 = or i64 %a, %b
%0 = tail call i64 asm sideeffect "#$0 $1", "=r,r,~{i0},~{i1},~{i2},~{i3},~{i4},~{i5},~{i6},~{i7},~{g1},~{g2},~{g3},~{g4},~{g5},~{g6},~{g7},~{l0},~{l1},~{l2},~{l3},~{l4},~{l5},~{l6},~{l7},~{o0},~{o1},~{o2},~{o3},~{o4},~{o5},~{o6}"(i64 %r0)
ret i64 %r0
}
; CHECK-LABEL: test_xor_spill
; CHECK: xor %i0, %i1, [[R:%[gilo][0-7]]]
; CHECK: stx [[R]], [%fp+{{.+}}]
; CHECK: ldx [%fp+{{.+}}, %i0
define i64 @test_xor_spill(i64 %a, i64 %b) {
entry:
%r0 = xor i64 %a, %b
%0 = tail call i64 asm sideeffect "#$0 $1", "=r,r,~{i0},~{i1},~{i2},~{i3},~{i4},~{i5},~{i6},~{i7},~{g1},~{g2},~{g3},~{g4},~{g5},~{g6},~{g7},~{l0},~{l1},~{l2},~{l3},~{l4},~{l5},~{l6},~{l7},~{o0},~{o1},~{o2},~{o3},~{o4},~{o5},~{o6}"(i64 %r0)
ret i64 %r0
}
; CHECK-LABEL: test_add_spill
; CHECK: add %i0, %i1, [[R:%[gilo][0-7]]]
; CHECK: stx [[R]], [%fp+{{.+}}]
; CHECK: ldx [%fp+{{.+}}, %i0
define i64 @test_add_spill(i64 %a, i64 %b) {
entry:
%r0 = add i64 %a, %b
%0 = tail call i64 asm sideeffect "#$0 $1", "=r,r,~{i0},~{i1},~{i2},~{i3},~{i4},~{i5},~{i6},~{i7},~{g1},~{g2},~{g3},~{g4},~{g5},~{g6},~{g7},~{l0},~{l1},~{l2},~{l3},~{l4},~{l5},~{l6},~{l7},~{o0},~{o1},~{o2},~{o3},~{o4},~{o5},~{o6}"(i64 %r0)
ret i64 %r0
}
; CHECK-LABEL: test_sub_spill
; CHECK: sub %i0, %i1, [[R:%[gilo][0-7]]]
; CHECK: stx [[R]], [%fp+{{.+}}]
; CHECK: ldx [%fp+{{.+}}, %i0
define i64 @test_sub_spill(i64 %a, i64 %b) {
entry:
%r0 = sub i64 %a, %b
%0 = tail call i64 asm sideeffect "#$0 $1", "=r,r,~{i0},~{i1},~{i2},~{i3},~{i4},~{i5},~{i6},~{i7},~{g1},~{g2},~{g3},~{g4},~{g5},~{g6},~{g7},~{l0},~{l1},~{l2},~{l3},~{l4},~{l5},~{l6},~{l7},~{o0},~{o1},~{o2},~{o3},~{o4},~{o5},~{o6}"(i64 %r0)
ret i64 %r0
}
; CHECK-LABEL: test_andi_spill
; CHECK: and %i0, 1729, [[R:%[gilo][0-7]]]
; CHECK: stx [[R]], [%fp+{{.+}}]
; CHECK: ldx [%fp+{{.+}}, %i0
define i64 @test_andi_spill(i64 %a) {
entry:
%r0 = and i64 %a, 1729
%0 = tail call i64 asm sideeffect "#$0 $1", "=r,r,~{i0},~{i1},~{i2},~{i3},~{i4},~{i5},~{i6},~{i7},~{g1},~{g2},~{g3},~{g4},~{g5},~{g6},~{g7},~{l0},~{l1},~{l2},~{l3},~{l4},~{l5},~{l6},~{l7},~{o0},~{o1},~{o2},~{o3},~{o4},~{o5},~{o6}"(i64 %r0)
ret i64 %r0
}
; CHECK-LABEL: test_ori_spill
; CHECK: or %i0, 1729, [[R:%[gilo][0-7]]]
; CHECK: stx [[R]], [%fp+{{.+}}]
; CHECK: ldx [%fp+{{.+}}, %i0
define i64 @test_ori_spill(i64 %a) {
entry:
%r0 = or i64 %a, 1729
%0 = tail call i64 asm sideeffect "#$0 $1", "=r,r,~{i0},~{i1},~{i2},~{i3},~{i4},~{i5},~{i6},~{i7},~{g1},~{g2},~{g3},~{g4},~{g5},~{g6},~{g7},~{l0},~{l1},~{l2},~{l3},~{l4},~{l5},~{l6},~{l7},~{o0},~{o1},~{o2},~{o3},~{o4},~{o5},~{o6}"(i64 %r0)
ret i64 %r0
}
; CHECK-LABEL: test_xori_spill
; CHECK: xor %i0, 1729, [[R:%[gilo][0-7]]]
; CHECK: stx [[R]], [%fp+{{.+}}]
; CHECK: ldx [%fp+{{.+}}, %i0
define i64 @test_xori_spill(i64 %a) {
entry:
%r0 = xor i64 %a, 1729
%0 = tail call i64 asm sideeffect "#$0 $1", "=r,r,~{i0},~{i1},~{i2},~{i3},~{i4},~{i5},~{i6},~{i7},~{g1},~{g2},~{g3},~{g4},~{g5},~{g6},~{g7},~{l0},~{l1},~{l2},~{l3},~{l4},~{l5},~{l6},~{l7},~{o0},~{o1},~{o2},~{o3},~{o4},~{o5},~{o6}"(i64 %r0)
ret i64 %r0
}
; CHECK-LABEL: test_addi_spill
; CHECK: add %i0, 1729, [[R:%[gilo][0-7]]]
; CHECK: stx [[R]], [%fp+{{.+}}]
; CHECK: ldx [%fp+{{.+}}, %i0
define i64 @test_addi_spill(i64 %a) {
entry:
%r0 = add i64 %a, 1729
%0 = tail call i64 asm sideeffect "#$0 $1", "=r,r,~{i0},~{i1},~{i2},~{i3},~{i4},~{i5},~{i6},~{i7},~{g1},~{g2},~{g3},~{g4},~{g5},~{g6},~{g7},~{l0},~{l1},~{l2},~{l3},~{l4},~{l5},~{l6},~{l7},~{o0},~{o1},~{o2},~{o3},~{o4},~{o5},~{o6}"(i64 %r0)
ret i64 %r0
}
; CHECK-LABEL: test_subi_spill
; CHECK: add %i0, -1729, [[R:%[gilo][0-7]]]
; CHECK: stx [[R]], [%fp+{{.+}}]
; CHECK: ldx [%fp+{{.+}}, %i0
define i64 @test_subi_spill(i64 %a) {
entry:
%r0 = sub i64 %a, 1729
%0 = tail call i64 asm sideeffect "#$0 $1", "=r,r,~{i0},~{i1},~{i2},~{i3},~{i4},~{i5},~{i6},~{i7},~{g1},~{g2},~{g3},~{g4},~{g5},~{g6},~{g7},~{l0},~{l1},~{l2},~{l3},~{l4},~{l5},~{l6},~{l7},~{o0},~{o1},~{o2},~{o3},~{o4},~{o5},~{o6}"(i64 %r0)
ret i64 %r0
}