Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/Mips/longbranch/compact-branches-long-branch.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

155 lines
2.9 KiB
LLVM

; RUN: llc < %s -mtriple=mips -mcpu=mips32r6 -force-mips-long-branch | FileCheck %s
; Check that when MIPS32R6 with the static relocation model with the usage of
; long branches, that there is a nop between any compact branch and the static
; relocation method of expanding branches. Previously, it could result in 'j'
; following a b(ne|eq)zc, which would raise a reserved instruction exception.
declare i32 @f(i32)
declare i32 @g()
; CHECK-LABEL: test1:
; CHECK: bnezc
; CHECK-NEXT: nop
define i32 @test1(i32 %a) {
entry:
%0 = icmp eq i32 %a, 0
br i1 %0, label %cond.true, label %cond.false
cond.true:
%1 = call i32 @f(i32 %a)
ret i32 %1
cond.false:
%2 = call i32 @g()
ret i32 %2
}
; CHECK-LABEL: test2:
; CHECK: bgezc
; CHECK-NEXT: nop
define i32 @test2(i32 %a) {
entry:
%0 = icmp sge i32 %a, 0
br i1 %0, label %cond.true, label %cond.false
cond.true:
%1 = call i32 @f(i32 %a)
ret i32 %1
cond.false:
%2 = call i32 @g()
ret i32 %2
}
; CHECK-LABEL: test3:
; CHECK: blezc
; CHECK-NEXT: nop
define i32 @test3(i32 %a) {
entry:
%0 = icmp sle i32 %a, 0
br i1 %0, label %cond.true, label %cond.false
cond.true:
%1 = call i32 @f(i32 %a)
ret i32 %1
cond.false:
%2 = call i32 @g()
ret i32 %2
}
; CHECK-LABEL: test4:
; CHECK: bgtzc
; CHECK-NEXT: nop
define i32 @test4(i32 %a) {
entry:
%0 = icmp sgt i32 %a, 0
br i1 %0, label %cond.true, label %cond.false
cond.true:
%1 = call i32 @f(i32 %a)
ret i32 %1
cond.false:
%2 = call i32 @g()
ret i32 %2
}
; CHECK-LABEL: test5:
; CHECK: bgezc
; CHECK-NEXT: nop
define i32 @test5(i32 %a) {
entry:
%0 = icmp slt i32 %a, 0
br i1 %0, label %cond.true, label %cond.false
cond.true:
%1 = call i32 @f(i32 %a)
ret i32 %1
cond.false:
%2 = call i32 @g()
ret i32 %2
}
; CHECK-LABEL: test6:
; CHECK: bltuc
; CHECK-NEXT: nop
define i32 @test6(i32 %a, i32 %b) {
entry:
%0 = icmp ugt i32 %a, %b
br i1 %0, label %cond.true, label %cond.false
cond.true:
%1 = call i32 @f(i32 %a)
ret i32 %1
cond.false:
%2 = call i32 @g()
ret i32 %2
}
; CHECK-LABEL: test7:
; CHECK: bgeuc
; CHECK-NEXT: nop
define i32 @test7(i32 %a, i32 %b) {
entry:
%0 = icmp uge i32 %a, %b
br i1 %0, label %cond.true, label %cond.false
cond.true:
%1 = call i32 @f(i32 %a)
ret i32 %1
cond.false:
%2 = call i32 @g()
ret i32 %2
}
; CHECK-LABEL: test8:
; CHECK: bltuc
; CHECK-NEXT: nop
define i32 @test8(i32 %a, i32 %b) {
entry:
%0 = icmp ult i32 %a, %b
br i1 %0, label %cond.true, label %cond.false
cond.true:
%1 = call i32 @f(i32 %a)
ret i32 %1
cond.false:
%2 = call i32 @g()
ret i32 %2
}
; CHECK-LABEL: test9:
; CHECK: bgeuc
; CHECK-NEXT: nop
define i32 @test9(i32 %a, i32 %b) {
entry:
%0 = icmp ule i32 %a, %b
br i1 %0, label %cond.true, label %cond.false
cond.true:
%1 = call i32 @f(i32 %a)
ret i32 %1
cond.false:
%2 = call i32 @g()
ret i32 %2
}