Skip to content

Validation error when optimizations are enabled: llvm.umul.with.overflow.i32 is not a DXIL function #8598

Description

@teoxoy

Description
Encountered a DXIL validation error when optimizations are enabled. With -Od the shader compiles fine.

Steps to Reproduce
https://godbolt.org/z/hs5se5zzG

RWStructuredBuffer<uint> buf : register(u0);

[numthreads(1, 1, 1)]
void main()
{
    uint x = buf[0];
    uint y = buf[1];
    if (((uint64_t)x) * ((uint64_t)y) > 0xffffffffull) {
        buf[2] = 1;
    }
}

Ran via:

dxc.exe test.hlsl -E main -T cs_6_0

Actual Behavior

error: validation errors
test.hlsl:8:39: error: ExtractValue should only be used on dxil struct types and cmpxchg.
note: at '%7 = extractvalue { i32, i1 } %6, 1' in block '#0' of function 'main'.
Function: llvm.umul.with.overflow.i32: error: External function 'llvm.umul.with.overflow.i32' is not a DXIL function.
Validation failed.

Environment

  • DXC version: v1.9.2602.24
  • Host Operating System: Windows 11 26200.8655

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug, regression, crashneeds-triageAwaiting triage

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions