Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/Mips/nmadd.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

85 lines
3.5 KiB
LLVM

; Check whether nmadd/nmsub instructions are properly generated
; RUN: llc < %s -mtriple=mipsel -mcpu=mips32r2 | FileCheck %s -check-prefixes=ALL,CHECK-NM
; RUN: llc < %s -mtriple=mipsel -mcpu=mips32r2 -mattr=+fp64 | FileCheck %s -check-prefixes=ALL,CHECK-NM
; RUN: llc < %s -mtriple=mipsel -mcpu=mips32r2 -mattr=micromips -asm-show-inst | FileCheck %s -check-prefixes=ALL,CHECK-NM,CHECK-MM
; RUN: llc < %s -mtriple=mips64el -mcpu=mips64 -target-abi=n64 | FileCheck %s -check-prefixes=ALL,CHECK-NM-64
; RUN: llc < %s -mtriple=mips64el -mcpu=mips64r2 -target-abi=n64 | FileCheck %s -check-prefixes=ALL,CHECK-NM-64
; RUN: llc < %s -mtriple=mips64el -mcpu=mips4 -target-abi=n64 | FileCheck %s -check-prefixes=ALL,CHECK-NM-64
; RUN: llc < %s -mtriple=mipsel -mcpu=mips32 | FileCheck %s -check-prefixes=ALL,CHECK-NOT-NM
; RUN: llc < %s -mtriple=mipsel -mcpu=mips32r6 | FileCheck %s -check-prefixes=ALL,CHECK-NOT-NM
; RUN: llc < %s -mtriple=mips64el -mcpu=mips3 -target-abi=n64 | FileCheck %s -check-prefixes=ALL,CHECK-NOT-NM-64
; RUN: llc < %s -mtriple=mipsel -mcpu=mips32r6 -mattr=micromips | FileCheck %s -check-prefixes=ALL,CHECK-NOT-NM
; RUN: llc < %s -mtriple=mipsel -mcpu=mips32r3 -mattr=micromips | FileCheck %s -check-prefixes=ALL,CHECK-NM
define float @add1(float %f, float %g, float %h) local_unnamed_addr #0 {
entry:
; ALL-LABEL: add1
; CHECK-NM-64: nmadd.s $f0, $f14, $f12, $f13
; CHECK-NM: nmadd.s $f0, $f0, $f12, $f14
; CHECK-MM: NMADD_S_MM
; CHECK-NOT-NM-64: mul.s $f0, $f12, $f13
; CHECK-NOT-NM-64: neg.s $f0, $f0
; CHECK-NOT-NM: mul.s $f0, $f12, $f14
; CHECK-NOT-NM: neg.s $f0, $f0
%mul = fmul nnan float %f, %g
%add = fadd nnan float %mul, %h
%sub = fsub nnan float -0.000000e+00, %add
ret float %sub
}
define double @add2(double %f, double %g, double %h) local_unnamed_addr #0 {
entry:
; ALL-LABEL: add2
; CHECK-NM-64: nmadd.d $f0, $f14, $f12, $f13
; CHECK-NM: nmadd.d $f0, $f0, $f12, $f14
; CHECK-MM: NMADD_D32_MM
; CHECK-NOT-NM-64: mul.d $f0, $f12, $f13
; CHECK-NOT-NM-64: neg.d $f0, $f0
; CHECK-NOT-NM: mul.d $f0, $f12, $f14
; CHECK-NOT-NM: neg.d $f0, $f0
%mul = fmul nnan double %f, %g
%add = fadd nnan double %mul, %h
%sub = fsub nnan double -0.000000e+00, %add
ret double %sub
}
define float @sub1(float %f, float %g, float %h) local_unnamed_addr #0 {
entry:
; ALL-LABEL: sub1
; CHECK-NM-64: nmsub.s $f0, $f14, $f12, $f13
; CHECK-NM: nmsub.s $f0, $f0, $f12, $f14
; CHECK-MM: NMSUB_S_MM
; CHECK-NOT-NM-64: mul.s $f0, $f12, $f13
; CHECK-NOT-NM-64: neg.s $f0, $f0
; CHECK-NOT-NM: mul.s $f0, $f12, $f14
; CHECK-NOT-NM: neg.s $f0, $f0
%mul = fmul nnan float %f, %g
%sub = fsub nnan float %mul, %h
%sub1 = fsub nnan float -0.000000e+00, %sub
ret float %sub1
}
define double @sub2(double %f, double %g, double %h) local_unnamed_addr #0 {
entry:
; ALL-LABEL: sub2
; CHECK-NM-64: nmsub.d $f0, $f14, $f12, $f13
; CHECK-NM: nmsub.d $f0, $f0, $f12, $f14
; CHECK-MM: NMSUB_D32_MM
; CHECK-NOT-NM-64: mul.d $f0, $f12, $f13
; CHECK-NOT-NM-64: neg.d $f0, $f0
; CHECK-NOT-NM: mul.d $f0, $f12, $f14
; CHECK-NOT-NM: neg.d $f0, $f0
%mul = fmul nnan double %f, %g
%sub = fsub nnan double %mul, %h
%sub1 = fsub nnan double -0.000000e+00, %sub
ret double %sub1
}