Skip to content

About division on amdgpu backend #153521

@0oyyo0

Description

@0oyyo0

I'm looking for information on the AMD GPU backend's support for integer division. I haven't found any instructions related to integer division in the ISA documentation, and the code I see for division, such as in AMDGPUCodeGenPrepare.cpp and SIISelLowering.cpp, uses other methods for calculation, e.g. (a/b---->a*(1/b)) . Therefore, I'd like to understand the AMD GPU hardware's support for division and why it's converted to other methods. I suspect it's because division is time-consuming.

One conversion method is as follows:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend:AMDGPUquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions