Skip to content

Dot products on unsigned integer vectors do not use umad #7058

@pow2clk

Description

@pow2clk

Description
When using the dot intrinsic to calculate a dot product, the generated code will use a signed mad operator instead of the umad operator that the mul intrinsic uses when it amounts to a dot product.

Steps to Reproduce

Just pass unsigned integer vectors of 2 or more elements to the dot intrinsic.

Switching the defined FUNC between dot and mul in this godbolt link will show the difference in output: https://godbolt.org/z/Pz6a5a38r

Actual Behavior

You can see that it will change between calling IMad with opcode 48 and UMad with opcode 49.

Environment

  • DXC version 1.8.2407
  • Host Operating System macos 14.7.2

Metadata

Metadata

Assignees

Labels

bugBug, regression, crashneeds-triageAwaiting triage

Type

No type

Projects

Status

Done

Status

Triaged

Relationships

None yet

Development

No branches or pull requests

Issue actions