-
Notifications
You must be signed in to change notification settings - Fork 11.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement the atan2
HLSL Function
#70096
Open
8 of 14 tasks
Labels
Comments
farzonl
changed the title
[HLSL] implement
Implement the Jul 16, 2024
atan2
intrinsicatan2
HLSL Function
52 tasks
I can take this one. |
tex3d
added a commit
to tex3d/llvm-project
that referenced
this issue
Sep 9, 2024
Issue: llvm#70096 Changes: - Doc updates: - `clang/docs/LanguageExtensions.rst' - Document the new elementwise atan2 builtin. - `llvm/docs/LangRef.rst' - Document the atan2 intrinsic - TableGen: - `clang/include/clang/Basic/Builtins.td' - Implement the atan2 builtin. - `llvm/include/llvm/IR/Intrinsics.td' - Create the atan2 intrinsic - Sema checking: - `clang/lib/Sema/SemaChecking.cpp' - Add generic sema checks to the atan2 builtin - `clang/lib/Sema/SemaHLSL` Add HLSL specifc sema checks to the atan2 builtin - `clang/lib/CodeGen/CGBuiltin.cpp' - invoke the atan2 intrinsic on uses of the builtin - `clang/lib/Headers/hlsl/hlsl_intrinsics.h' - Associate the atan2 builtin with the equivalent hlsl apis
tex3d
added a commit
to tex3d/llvm-project
that referenced
this issue
Sep 9, 2024
Issue: llvm#70096 Changes: - `llvm/lib/Target/DirectX/DXILIntrinsicExpansion.cpp` - Expand atan2 intrinsic using atan for DXIL.
tex3d
added a commit
to tex3d/llvm-project
that referenced
this issue
Sep 9, 2024
Issue: llvm#70096 Changes: - `llvm/docs/GlobalISel/GenericOpcode.rst` - Document the G_FATAN2 opcode - `llvm/include/llvm/Support/TargetOpcodes.def` - Create a G_FATAN2 Opcode handler - `llvm/include/llvm/Target/GenericOpcodes.td` - Define the G_FATAN2 Opcode - `llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp` Map the atan2 intrinsic to G_FATAN2 Opcode - `llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp` - Map the G_FATAN2 opcode to the GLSL 4.5 and openCL atan2 instructions. - `llvm/lib/Target/SPIRV/SPIRVLegalizerInfo.cpp` - Define G_FATAN2 as a legal spirv target opcode.
tex3d
added a commit
to tex3d/llvm-project
that referenced
this issue
Sep 9, 2024
Issue: llvm#70096 Changes: - Doc updates: - `clang/docs/LanguageExtensions.rst` - Document the new elementwise atan2 builtin. - `llvm/docs/LangRef.rst` - Document the atan2 intrinsic - TableGen: - `clang/include/clang/Basic/Builtins.td` - Implement the atan2 builtin. - `llvm/include/llvm/IR/Intrinsics.td` - Create the atan2 intrinsic - Sema checking: - `clang/lib/Sema/SemaChecking.cpp` - Add generic sema checks to the atan2 builtin - `clang/lib/Sema/SemaHLSL` Add HLSL specifc sema checks to the atan2 builtin - `clang/lib/CodeGen/CGBuiltin.cpp` - invoke the atan2 intrinsic on uses of the builtin - `clang/lib/Headers/hlsl/hlsl_intrinsics.h` - Associate the atan2 builtin with the equivalent hlsl apis
tex3d
added a commit
to tex3d/llvm-project
that referenced
this issue
Sep 9, 2024
Issue: llvm#70096 Changes: - `llvm/lib/Target/DirectX/DXILIntrinsicExpansion.cpp` - Expand atan2 intrinsic using atan for DXIL.
tex3d
added a commit
to tex3d/llvm-project
that referenced
this issue
Sep 9, 2024
Issue: llvm#70096 Changes: - `llvm/docs/GlobalISel/GenericOpcode.rst` - Document the G_FATAN2 opcode - `llvm/include/llvm/Support/TargetOpcodes.def` - Create a G_FATAN2 Opcode handler - `llvm/include/llvm/Target/GenericOpcodes.td` - Define the G_FATAN2 Opcode - `llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp` Map the atan2 intrinsic to G_FATAN2 Opcode - `llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp` - Map the G_FATAN2 opcode to the GLSL 4.5 and openCL atan2 instructions. - `llvm/lib/Target/SPIRV/SPIRVLegalizerInfo.cpp` - Define G_FATAN2 as a legal spirv target opcode.
tex3d
added a commit
to tex3d/llvm-project
that referenced
this issue
Sep 9, 2024
Issue: llvm#70096 Changes: - `llvm/lib/Target/DirectX/DXILIntrinsicExpansion.cpp` - Expand atan2 intrinsic using atan for DXIL.
tex3d
added a commit
to tex3d/llvm-project
that referenced
this issue
Sep 9, 2024
Issue: llvm#70096 Changes: - `llvm/docs/GlobalISel/GenericOpcode.rst` - Document the G_FATAN2 opcode - `llvm/include/llvm/Support/TargetOpcodes.def` - Create a G_FATAN2 Opcode handler - `llvm/include/llvm/Target/GenericOpcodes.td` - Define the G_FATAN2 Opcode - `llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp` Map the atan2 intrinsic to G_FATAN2 Opcode - `llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp` - Map the G_FATAN2 opcode to the GLSL 4.5 and openCL atan2 instructions. - `llvm/lib/Target/SPIRV/SPIRVLegalizerInfo.cpp` - Define G_FATAN2 as a legal spirv target opcode.
tex3d
added a commit
to tex3d/llvm-project
that referenced
this issue
Sep 10, 2024
Issue: llvm#70096 Changes: - Doc updates: - `clang/docs/LanguageExtensions.rst` - Document the new elementwise atan2 builtin. - `llvm/docs/LangRef.rst` - Document the atan2 intrinsic - TableGen: - `clang/include/clang/Basic/Builtins.td` - Implement the atan2 builtin. - `llvm/include/llvm/IR/Intrinsics.td` - Create the atan2 intrinsic - Sema checking: - `clang/lib/Sema/SemaChecking.cpp` - Add generic sema checks to the atan2 builtin - `clang/lib/Sema/SemaHLSL` Add HLSL specifc sema checks to the atan2 builtin - `clang/lib/CodeGen/CGBuiltin.cpp` - invoke the atan2 intrinsic on uses of the builtin - `clang/lib/Headers/hlsl/hlsl_intrinsics.h` - Associate the atan2 builtin with the equivalent hlsl apis
tex3d
added a commit
to tex3d/llvm-project
that referenced
this issue
Sep 10, 2024
Issue: llvm#70096 Changes: - `llvm/lib/Target/DirectX/DXILIntrinsicExpansion.cpp` - Expand atan2 intrinsic using atan for DXIL.
tex3d
added a commit
to tex3d/llvm-project
that referenced
this issue
Sep 10, 2024
Issue: llvm#70096 Changes: - `llvm/docs/GlobalISel/GenericOpcode.rst` - Document the G_FATAN2 opcode - `llvm/include/llvm/Support/TargetOpcodes.def` - Create a G_FATAN2 Opcode handler - `llvm/include/llvm/Target/GenericOpcodes.td` - Define the G_FATAN2 Opcode - `llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp` Map the atan2 intrinsic to G_FATAN2 Opcode - `llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp` - Map the G_FATAN2 opcode to the GLSL 4.5 and openCL atan2 instructions. - `llvm/lib/Target/SPIRV/SPIRVLegalizerInfo.cpp` - Define G_FATAN2 as a legal spirv target opcode.
tex3d
added a commit
to tex3d/llvm-project
that referenced
this issue
Sep 13, 2024
Issue: llvm#70096 Changes: - `llvm/lib/Target/DirectX/DXILIntrinsicExpansion.cpp` - Expand atan2 intrinsic using atan for DXIL.
tex3d
added a commit
to tex3d/llvm-project
that referenced
this issue
Sep 13, 2024
Issue: llvm#70096 Changes: - `llvm/docs/GlobalISel/GenericOpcode.rst` - Document the G_FATAN2 opcode - `llvm/include/llvm/Support/TargetOpcodes.def` - Create a G_FATAN2 Opcode handler - `llvm/include/llvm/Target/GenericOpcodes.td` - Define the G_FATAN2 Opcode - `llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp` Map the atan2 intrinsic to G_FATAN2 Opcode - `llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp` - Map the G_FATAN2 opcode to the GLSL 4.5 and openCL atan2 instructions. - `llvm/lib/Target/SPIRV/SPIRVLegalizerInfo.cpp` - Define G_FATAN2 as a legal spirv target opcode.
farzonl
pushed a commit
that referenced
this issue
Sep 24, 2024
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.
farzonl
pushed a commit
that referenced
this issue
Sep 25, 2024
#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)
bob80905
pushed a commit
that referenced
this issue
Sep 26, 2024
This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 - Add generic opcode for atan2 - Add SPIRV lowering for atan2 Part 2 for Implement the atan2 HLSL Function #70096.
augusto2112
pushed a commit
to augusto2112/llvm-project
that referenced
this issue
Sep 26, 2024
…108865) 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 llvm#70096.
augusto2112
pushed a commit
to augusto2112/llvm-project
that referenced
this issue
Sep 26, 2024
llvm#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 llvm#70096. (reland llvm#108865 reverted in llvm#109842 due to doc build break)
tex3d
added a commit
that referenced
this issue
Oct 1, 2024
This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 - Add HLSL frontend for atan2 - Add clang Builtin, map to new llvm.atan2 - SemaChecking restrict to floating point and 2 args - SemaHLSL restrict to float or half. - Add to clang ReleaseNotes.rst and LanguageExtensions.rst - Add half-float-only-errors2.hlsl for 2 arg intrinsics, and update half-float-only-errors.hlsl with scalar case for consistency - Remove fmod-errors.hlsl and pow-errors.hlsl now covered in half-float-only-errors2.hlsl Part 3 for Implement the atan2 HLSL Function #70096.
tex3d
added a commit
to tex3d/llvm-project
that referenced
this issue
Oct 1, 2024
This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 - `VecFuncs.def`: define intrinsic to sleef/armpl mapping - `LegalizerHelper.cpp`: add missing fewerElementsVector handling for the new atan2 intrinsic - `AArch64ISelLowering.cpp`: Add arch64 specializations for lowering like neon instructions - `AArch64LegalizerInfo.cpp`: Legalize atan2. Part 5 for Implement the atan2 HLSL Function llvm#70096.
VitaNuo
pushed a commit
to VitaNuo/llvm-project
that referenced
this issue
Oct 2, 2024
This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 - Add HLSL frontend for atan2 - Add clang Builtin, map to new llvm.atan2 - SemaChecking restrict to floating point and 2 args - SemaHLSL restrict to float or half. - Add to clang ReleaseNotes.rst and LanguageExtensions.rst - Add half-float-only-errors2.hlsl for 2 arg intrinsics, and update half-float-only-errors.hlsl with scalar case for consistency - Remove fmod-errors.hlsl and pow-errors.hlsl now covered in half-float-only-errors2.hlsl Part 3 for Implement the atan2 HLSL Function llvm#70096.
VitaNuo
pushed a commit
to VitaNuo/llvm-project
that referenced
this issue
Oct 2, 2024
This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 - Add HLSL frontend for atan2 - Add clang Builtin, map to new llvm.atan2 - SemaChecking restrict to floating point and 2 args - SemaHLSL restrict to float or half. - Add to clang ReleaseNotes.rst and LanguageExtensions.rst - Add half-float-only-errors2.hlsl for 2 arg intrinsics, and update half-float-only-errors.hlsl with scalar case for consistency - Remove fmod-errors.hlsl and pow-errors.hlsl now covered in half-float-only-errors2.hlsl Part 3 for Implement the atan2 HLSL Function llvm#70096.
Sterling-Augustine
pushed a commit
to Sterling-Augustine/llvm-project
that referenced
this issue
Oct 3, 2024
This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 - Add HLSL frontend for atan2 - Add clang Builtin, map to new llvm.atan2 - SemaChecking restrict to floating point and 2 args - SemaHLSL restrict to float or half. - Add to clang ReleaseNotes.rst and LanguageExtensions.rst - Add half-float-only-errors2.hlsl for 2 arg intrinsics, and update half-float-only-errors.hlsl with scalar case for consistency - Remove fmod-errors.hlsl and pow-errors.hlsl now covered in half-float-only-errors2.hlsl Part 3 for Implement the atan2 HLSL Function llvm#70096.
xgupta
pushed a commit
to xgupta/llvm-project
that referenced
this issue
Oct 4, 2024
…108865) 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 llvm#70096.
xgupta
pushed a commit
to xgupta/llvm-project
that referenced
this issue
Oct 4, 2024
llvm#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 llvm#70096. (reland llvm#108865 reverted in llvm#109842 due to doc build break)
xgupta
pushed a commit
to xgupta/llvm-project
that referenced
this issue
Oct 4, 2024
This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 - Add generic opcode for atan2 - Add SPIRV lowering for atan2 Part 2 for Implement the atan2 HLSL Function llvm#70096.
xgupta
pushed a commit
to xgupta/llvm-project
that referenced
this issue
Oct 4, 2024
This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 - Add HLSL frontend for atan2 - Add clang Builtin, map to new llvm.atan2 - SemaChecking restrict to floating point and 2 args - SemaHLSL restrict to float or half. - Add to clang ReleaseNotes.rst and LanguageExtensions.rst - Add half-float-only-errors2.hlsl for 2 arg intrinsics, and update half-float-only-errors.hlsl with scalar case for consistency - Remove fmod-errors.hlsl and pow-errors.hlsl now covered in half-float-only-errors2.hlsl Part 3 for Implement the atan2 HLSL Function llvm#70096.
tex3d
added a commit
to tex3d/llvm-project
that referenced
this issue
Oct 10, 2024
This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 - `VecFuncs.def`: define intrinsic to sleef/armpl mapping - `LegalizerHelper.cpp`: add missing fewerElementsVector handling for the new atan2 intrinsic - `AArch64ISelLowering.cpp`: Add arch64 specializations for lowering like neon instructions - `AArch64LegalizerInfo.cpp`: Legalize atan2. Part 5 for Implement the atan2 HLSL Function llvm#70096.
tex3d
added a commit
to tex3d/llvm-project
that referenced
this issue
Oct 11, 2024
This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 - `VecFuncs.def`: define intrinsic to sleef/armpl mapping - `LegalizerHelper.cpp`: add missing fewerElementsVector handling for the new atan2 intrinsic - `AArch64ISelLowering.cpp`: Add arch64 specializations for lowering like neon instructions - `AArch64LegalizerInfo.cpp`: Legalize atan2. Part 5 for Implement the atan2 HLSL Function llvm#70096.
tex3d
added a commit
to tex3d/llvm-project
that referenced
this issue
Oct 15, 2024
This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 - `VecFuncs.def`: define intrinsic to sleef/armpl mapping - `LegalizerHelper.cpp`: add missing fewerElementsVector handling for the new atan2 intrinsic - `AArch64ISelLowering.cpp`: Add arch64 specializations for lowering like neon instructions - `AArch64LegalizerInfo.cpp`: Legalize atan2. Part 5 for Implement the atan2 HLSL Function llvm#70096.
tex3d
added a commit
to tex3d/llvm-project
that referenced
this issue
Oct 16, 2024
This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 - `VecFuncs.def`: define intrinsic to sleef/armpl mapping - `LegalizerHelper.cpp`: add missing fewerElementsVector handling for the new atan2 intrinsic - `AArch64ISelLowering.cpp`: Add arch64 specializations for lowering like neon instructions - `AArch64LegalizerInfo.cpp`: Legalize atan2. Part 5 for Implement the atan2 HLSL Function llvm#70096.
tex3d
added a commit
to tex3d/llvm-project
that referenced
this issue
Oct 16, 2024
This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 - `Builtins.td` - Add f16 support for libm atan2 builtin - `CGBuiltin.cpp` - Emit constraint atan2 intrinsic for clang builtin Part of Implement the atan2 HLSL Function llvm#70096.
tex3d
added a commit
that referenced
this issue
Oct 16, 2024
This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 Based on example PR #96222 and fix PR #101268, with some differences due to 2-arg intrinsic and intermediate refactor (RuntimeLibCalls.cpp). - Add llvm.experimental.constrained.atan2 - Intrinsics.td, ConstrainedOps.def, LangRef.rst - Add to ISDOpcodes.h and TargetSelectionDAG.td, connect to intrinsic in BasicTTIImpl.h, and LibFunc_ in SelectionDAGBuilder.cpp - Update LegalizeDAG.cpp, LegalizeFloatTypes.cpp, LegalizeVectorOps.cpp, and LegalizeVectorTypes.cpp - Update isKnownNeverNaN in SelectionDAG.cpp - Update SelectionDAGDumper.cpp - Update libcalls - RuntimeLibcalls.def, RuntimeLibcalls.cpp - TargetLoweringBase.cpp - Expand for vectors, promote f16 - X86ISelLowering.cpp - Expand f80, promote f32 to f64 for MSVC Part 4 for Implement the atan2 HLSL Function #70096.
tex3d
added a commit
to tex3d/llvm-project
that referenced
this issue
Oct 16, 2024
This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 - `VecFuncs.def`: define intrinsic to sleef/armpl mapping - `LegalizerHelper.cpp`: add missing fewerElementsVector handling for the new atan2 intrinsic - `AArch64ISelLowering.cpp`: Add arch64 specializations for lowering like neon instructions - `AArch64LegalizerInfo.cpp`: Legalize atan2. Part 5 for Implement the atan2 HLSL Function llvm#70096.
tex3d
added a commit
to tex3d/llvm-project
that referenced
this issue
Oct 16, 2024
This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 - `Builtins.td` - Add f16 support for libm atan2 builtin - `CGBuiltin.cpp` - Emit constraint atan2 intrinsic for clang builtin Part of Implement the atan2 HLSL Function llvm#70096.
This was referenced Oct 16, 2024
tex3d
added a commit
to tex3d/llvm-project
that referenced
this issue
Oct 16, 2024
When updating X86SelLowering.cpp based on llvm#96222, it was known that a needed change was missing which was merged later in llvm#101268. However, the corresponding test update to `fp-strict-libcalls-msvc32.ll` was missed. This change rectifies that oversight. Part of: Part of: Implement the atan2 HLSL Function llvm#70096.
bricknerb
pushed a commit
to bricknerb/llvm-project
that referenced
this issue
Oct 17, 2024
This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 Based on example PR llvm#96222 and fix PR llvm#101268, with some differences due to 2-arg intrinsic and intermediate refactor (RuntimeLibCalls.cpp). - Add llvm.experimental.constrained.atan2 - Intrinsics.td, ConstrainedOps.def, LangRef.rst - Add to ISDOpcodes.h and TargetSelectionDAG.td, connect to intrinsic in BasicTTIImpl.h, and LibFunc_ in SelectionDAGBuilder.cpp - Update LegalizeDAG.cpp, LegalizeFloatTypes.cpp, LegalizeVectorOps.cpp, and LegalizeVectorTypes.cpp - Update isKnownNeverNaN in SelectionDAG.cpp - Update SelectionDAGDumper.cpp - Update libcalls - RuntimeLibcalls.def, RuntimeLibcalls.cpp - TargetLoweringBase.cpp - Expand for vectors, promote f16 - X86ISelLowering.cpp - Expand f80, promote f32 to f64 for MSVC Part 4 for Implement the atan2 HLSL Function llvm#70096.
tex3d
added a commit
that referenced
this issue
Oct 17, 2024
When updating X86SelLowering.cpp for atan2, based on #96222, it was known that a needed change was missing which was merged later in #101268. However, the corresponding test update to `fp-strict-libcalls-msvc32.ll` was missed. This change rectifies that oversight. This also adds a missing label to the tanh test, since it's produced by update_llc_test_checks.py Part of: Implement the atan2 HLSL Function #70096.
tex3d
added a commit
that referenced
this issue
Oct 17, 2024
This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 - `WebAssemblyRuntimeLibcallSignatures.cpp`: Add `RTLIB::ATAN2*` to RuntimeLibcallSignatureTable - Add atan2 calls to `CodeGen/WebAssembly/libcalls-trig.ll` and update test checks Part of: Implement the atan2 HLSL Function #70096.
bricknerb
pushed a commit
to bricknerb/llvm-project
that referenced
this issue
Oct 21, 2024
When updating X86SelLowering.cpp for atan2, based on llvm#96222, it was known that a needed change was missing which was merged later in llvm#101268. However, the corresponding test update to `fp-strict-libcalls-msvc32.ll` was missed. This change rectifies that oversight. This also adds a missing label to the tanh test, since it's produced by update_llc_test_checks.py Part of: Implement the atan2 HLSL Function llvm#70096.
bricknerb
pushed a commit
to bricknerb/llvm-project
that referenced
this issue
Oct 21, 2024
This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 - `WebAssemblyRuntimeLibcallSignatures.cpp`: Add `RTLIB::ATAN2*` to RuntimeLibcallSignatureTable - Add atan2 calls to `CodeGen/WebAssembly/libcalls-trig.ll` and update test checks Part of: Implement the atan2 HLSL Function llvm#70096.
tex3d
added a commit
to tex3d/llvm-project
that referenced
this issue
Oct 21, 2024
This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 - `VecFuncs.def`: define intrinsic to sleef/armpl mapping - `LegalizerHelper.cpp`: add missing fewerElementsVector handling for the new atan2 intrinsic - `AArch64ISelLowering.cpp`: Add arch64 specializations for lowering like neon instructions - `AArch64LegalizerInfo.cpp`: Legalize atan2. Part 5 for Implement the atan2 HLSL Function llvm#70096.
tex3d
added a commit
to tex3d/llvm-project
that referenced
this issue
Oct 21, 2024
This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 - `Builtins.td` - Add f16 support for libm atan2 builtin - `CGBuiltin.cpp` - Emit constraint atan2 intrinsic for clang builtin Part of Implement the atan2 HLSL Function llvm#70096.
tex3d
added a commit
to tex3d/llvm-project
that referenced
this issue
Oct 21, 2024
This change is part of this proposal: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 This returns true from isTriviallyVectorizable for llvm.atan2 intrinsic. It also adds llvm atan2 intrinsic equivalents to VecFuncs.def for massv. Part of: Implement the atan2 HLSL Function llvm#70096.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note atan2 has been identified as a potential generic llvm intrinsic:
Investigation: #87367
RFC: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294
atan2
clang builtin,atan2
clang builtin withhlsl_intrinsics.h
atan2
toCheckHLSLBuiltinFunctionCall
inSemaChecking.cpp
atan2
toEmitHLSLBuiltinExpr
inCGBuiltin.cpp
clang/test/CodeGenHLSL/builtins/atan2.hlsl
clang/test/SemaHLSL/BuiltIns/atan2-errors.hlsl
Create theint_atan2
intrinsic inIntrinsics.td
Create theint_dx_atan2
intrinsic inIntrinsicsDirectX.td
DXILOpMapping
ofint_atan2
to17
inDXIL.td
atan2.ll
andatan2_errors.ll
tests inllvm/test/CodeGen/DirectX/
Create theint_spv_atan2
intrinsic inIntrinsicsSPIRV.td
In SPIRVInstructionSelector.cpp create theatan2
lowering and map it toint_spv_atan2
inSPIRVInstructionSelector::selectIntrinsic
.SPIRVInstructionSelector::spvSelect
Addllvm/test/CodeGen/SPIRV/hlsl-intrinsics/atan2.ll
DirectX
SPIR-V
Atan2:
Description:
Atan2
Arc tangent. Result is an angle, in radians, whose tangent is y / x.
The signs of x and y are used to determine what quadrant the angle
is in. The range of result values is [-π, π] . Result is undefined if
x and y are both 0.
The operand x and y must be a scalar or vector whose component type
is 16-bit or 32-bit floating-point.
Result Type and the type of all operands must be the same type.
Results are computed per component.
25
<id>
y
<id>
x
Test Case(s)
Example 1
HLSL:
Returns the arctangent of two values (x,y).
Parameters
Return Value
The arctangent of (y,x).
Remarks
The signs of the x and y parameters are used to determine the quadrant of the return values within the range of -π to π. The atan2 HLSL intrinsic function is well-defined for every point other than the origin, even if y equals 0 and x does not equal 0.
Type Description
Minimum Shader Model
This function is supported in the following shader models.
Requirements
See also
Intrinsic Functions (DirectX HLSL)
The text was updated successfully, but these errors were encountered: