Skip to content

Long Vector Execution Tests: Special Math Ops #7465

Closed

Description

The most recent Long Vector test plan document should be referenced when implementing: Long Vector Test Plan

Intrinsic DXIL OPCode(s) LLVM Instruction(s) HLSL Function Signature Notes Docs
frexp FCmpUNE, SExt, BitCast, And, Add, AShr, SIToFP, Store, Or frexp(x, out exp) Returns float, outputs int exponent — return type differs frexp
ldexp Exp FMul ldexp(x, exp) float, floatN, int, intN ldexp

Generic overview of adding a new test category:

  1. Add a table and row entries for new test cases to LongVectorOpTable.xml.
  2. Add test case for new test category in LongVectors.cpp. Re-use existing unary and binary op test logic.
  3. Add a new LongVector::_ Enum definition for the test category in LongVectors.h as well as the corresponding LongVectorOpTypeStringToEnumValue definition for the new enum.
    Example :
enum TrigonometricOpType {
  TrigonometricOpType_Acos,
  TrigonometricOpType_Asin,
  TrigonometricOpType_Atan,
  TrigonometricOpType_Cos,
  TrigonometricOpType_Cosh,
  TrigonometricOpType_Sin,
  TrigonometricOpType_Sinh,
  TrigonometricOpType_Tan,
  TrigonometricOpType_Tanh,
  TrigonometricOpType_EnumValueCount
};
  1. Update LongVector::TestConfig to handle logic for new Enum type. Most logic is already handled. Will need to extend logic for things like ComputeExpectedValue. But in general the changes needed here are test metadata in the LongVector::TestConfig class.
  2. Verify the new test cases.

**Note: ** Some special case intrinsics which don't fit the unary/binary op pattern with a single return value will need added logic.

Activity

  1. pow2clk commented on Jul 1, 2025

    @pow2clk
    Collaborator

    Maybe look at a way to divide these a bit further. Possibly unary vs binary?

  2. pow2clk commented on Jul 1, 2025

    @pow2clk
    Collaborator

    modf should be part of this somewhere.

  3. changed the title [-]Long Vector Execution Tests: Math Ops[/-] [+]Long Vector Execution Tests: Special Math Ops[/+] on Aug 6, 2025
  4. moved this from Ready to Active in HLSL Supporton Aug 25, 2025
  5. added a commit that references this issue on Sep 5, 2025
    7ed2d26
  6. moved this from Active to Closed in HLSL Supporton Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions