mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 18:36:42 +00:00

This commit moves the 'native' builtins that use asm statements to generate LLVM intrinsics to the CLC library. In doing so it converts them to use the appropriate elementwise builtin to generate the same intrinsic; there are no codegen changes to any target except to AMDGPU targets where `native_log` is no longer custom implemented and instead used the clang elementwise builtin. This work forms part of #127196 and indeed with this commit there are no 'generic' builtins using/abusing asm statements - the remaining builtins are specific to the amdgpu and r600 targets.
17 lines
589 B
Common Lisp
17 lines
589 B
Common Lisp
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include <clc/internal/clc.h>
|
|
|
|
#define __FLOAT_ONLY
|
|
#define FUNCTION __clc_native_exp2
|
|
#define __CLC_FUNCTION(x) __builtin_elementwise_exp2
|
|
#define __CLC_BODY <clc/shared/unary_def.inc>
|
|
|
|
#include <clc/math/gentype.inc>
|