1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
;=========================== begin_copyright_notice ============================
;
; Copyright (C) 2023-2024 Intel Corporation
;
; SPDX-License-Identifier: MIT
;
;============================ end_copyright_notice =============================
; RUN: %opt %use_old_pass_manager% -GenXTranslateIntrinsics -mcpu=XeHPC -mtriple=spir64-unknown-unknown -S < %s | FileCheck %s
declare <32 x float> @llvm.genx.absf.v32f32(<32 x float>)
declare <32 x float> @llvm.genx.cos.v32f32(<32 x float>)
declare <32 x float> @llvm.genx.exp.v32f32(<32 x float>)
declare <32 x float> @llvm.genx.log.v32f32(<32 x float>)
declare <32 x float> @llvm.genx.sin.v32f32(<32 x float>)
declare <32 x float> @llvm.genx.pow.v32f32(<32 x float>, <32 x float>)
; CHECK-LABEL: test_cos
define <32 x float> @test_cos(<32 x float> %arg) {
; CHECK: call afn <32 x float> @llvm.cos.v32f32(<32 x float> %arg)
%res = call <32 x float> @llvm.genx.cos.v32f32(<32 x float> %arg)
ret <32 x float> %res
}
; CHECK-LABEL: test_exp
define <32 x float> @test_exp(<32 x float> %arg) {
; CHECK: call afn <32 x float> @llvm.exp2.v32f32(<32 x float> %arg)
%res = call <32 x float> @llvm.genx.exp.v32f32(<32 x float> %arg)
ret <32 x float> %res
}
; CHECK-LABEL: test_log
define <32 x float> @test_log(<32 x float> %arg) {
; CHECK: call afn <32 x float> @llvm.log2.v32f32(<32 x float> %arg)
%res = call <32 x float> @llvm.genx.log.v32f32(<32 x float> %arg)
ret <32 x float> %res
}
; CHECK-LABEL: test_sin
define <32 x float> @test_sin(<32 x float> %arg) {
; CHECK: call afn <32 x float> @llvm.sin.v32f32(<32 x float> %arg)
%res = call <32 x float> @llvm.genx.sin.v32f32(<32 x float> %arg)
ret <32 x float> %res
}
; CHECK-LABEL: test_pow
define <32 x float> @test_pow(<32 x float> %a, <32 x float> %b) {
; CHECK: call afn <32 x float> @llvm.pow.v32f32(<32 x float> %a, <32 x float> %b)
%res = call <32 x float> @llvm.genx.pow.v32f32(<32 x float> %a, <32 x float> %b)
ret <32 x float> %res
}
; CHECK-LABEL: test_abs
define <32 x float> @test_abs(<32 x float> %arg) {
; CHECK: call <32 x float> @llvm.fabs.v32f32(<32 x float> %arg)
%res = call <32 x float> @llvm.genx.absf.v32f32(<32 x float> %arg)
ret <32 x float> %res
}
|