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
69 lines
1.9 KiB
LLVM
69 lines
1.9 KiB
LLVM
; RUN: llc < %s -mtriple=ve | FileCheck %s
|
||
|
||
;;; Test ‘fneg’ Instruction
|
||
;;;
|
||
;;; Syntax:
|
||
;;; <result> = fneg ptr <ty> <op1> ; yields ty:result
|
||
;;;
|
||
;;; Overview:
|
||
;;; The ‘fneg’ instruction returns the negation of its operand.
|
||
;;;
|
||
;;; Arguments:
|
||
;;; The argument to the ‘fneg’ instruction must be a floating-point or
|
||
;;; vector of floating-point values.
|
||
;;;
|
||
;;; Semantics:
|
||
;;;
|
||
;;; The value produced is a copy of the operand with its sign bit flipped.
|
||
;;; This instruction can also take any number of fast-math flags, which are
|
||
;;; optimization hints to enable otherwise unsafe floating-point
|
||
;;; optimizations.
|
||
;;;
|
||
;;; Example:
|
||
;;; <result> = fneg float %val ; yields float:result = -%var
|
||
;;;
|
||
;;; Note:
|
||
;;; We test only float/double/fp128.
|
||
|
||
; Function Attrs: norecurse nounwind readnone
|
||
define float @fneg_float(float %0) {
|
||
; CHECK-LABEL: fneg_float:
|
||
; CHECK: # %bb.0:
|
||
; CHECK-NEXT: sra.l %s0, %s0, 32
|
||
; CHECK-NEXT: lea %s1, -2147483648
|
||
; CHECK-NEXT: and %s1, %s1, (32)0
|
||
; CHECK-NEXT: xor %s0, %s0, %s1
|
||
; CHECK-NEXT: sll %s0, %s0, 32
|
||
; CHECK-NEXT: b.l.t (, %s10)
|
||
%2 = fneg float %0
|
||
ret float %2
|
||
}
|
||
|
||
; Function Attrs: norecurse nounwind readnone
|
||
define double @fneg_double(double %0) {
|
||
; CHECK-LABEL: fneg_double:
|
||
; CHECK: # %bb.0:
|
||
; CHECK-NEXT: xor %s0, %s0, (1)1
|
||
; CHECK-NEXT: b.l.t (, %s10)
|
||
%2 = fneg double %0
|
||
ret double %2
|
||
}
|
||
|
||
; Function Attrs: norecurse nounwind readnone
|
||
define fp128 @fneg_quad(fp128 %0) {
|
||
; CHECK-LABEL: fneg_quad:
|
||
; CHECK: .LBB{{[0-9]+}}_2:
|
||
; CHECK-NEXT: st %s1, (, %s11)
|
||
; CHECK-NEXT: st %s0, 8(, %s11)
|
||
; CHECK-NEXT: ld1b.zx %s0, 15(, %s11)
|
||
; CHECK-NEXT: lea %s1, 128
|
||
; CHECK-NEXT: xor %s0, %s0, %s1
|
||
; CHECK-NEXT: st1b %s0, 15(, %s11)
|
||
; CHECK-NEXT: ld %s1, (, %s11)
|
||
; CHECK-NEXT: ld %s0, 8(, %s11)
|
||
; CHECK-NEXT: adds.l %s11, 16, %s11
|
||
; CHECK-NEXT: b.l.t (, %s10)
|
||
%2 = fneg fp128 %0
|
||
ret fp128 %2
|
||
}
|