Tex Riddell cfe1adc42a
Reland: [DirectX] Add atan2 intrinsic and expand for DXIL backend (p1) (#109878)
This change is part of this proposal:
https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294

This preliminary work adds the intrinsic to llvm and expands using atan
intrinsic for DXIL backend, since DXIL has no atan2 op.

Part 1 for Implement the atan2 HLSL Function #70096.

(reland #108865 reverted in #109842 due to doc build break)
2024-09-25 00:06:13 -04:00

12 lines
430 B
LLVM

; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s
; DXIL operation atan does not support double overload type
; CHECK: in function atan2_double
; CHECK-SAME: Cannot create ATan operation: Invalid overload type
define noundef double @atan2_double(double noundef %a, double noundef %b) #0 {
entry:
%1 = call double @llvm.atan2.f64(double %a, double %b)
ret double %1
}