Skip to content

AMDGPU: support folding 64-bit immediates #67781

Closed
@jayfoad

Description

@jayfoad

SIFoldOperands should support folding 64-bit immediates into literal operands.

Before GFX10 this was rarely a problem because most 64-bit instructions are VOP3 only and VOP3 did not allow a literal operand. One exception is V_FMAC_F64 on gfx90a+. Here's an example where we generate v_fmac_f64_e32 v[0:1], s[4:5], v[2:3] which could be folded to v_fmac_f64_e32 v[0:1], 0x41200000, v[2:3]: https://godbolt.org/z/EMTjfj6jb

On GFX10+ VOP3 can take a literal operand, so there are lots of 64-bit instructions that could be folded.

Metadata

Metadata

Assignees

Labels

backend:AMDGPUenhancementImproving things as opposed to bug fixing, e.g. new or missing feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions