This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Rename gfx9 version of v_add_i32/v_sub_i32
ClosedPublic

Authored by arsenm on Jul 14 2020, 6:11 PM.

Details

Summary

The carry-out opcode is renamed, so eliminate the deceptive _gfx9,
which looked like the encoded instruction. The real encoded version
was named _gfx9_gfx9.

Move it into the VI encoding namespace. The gfx9 namespace is just to
deal with the renamed instructions that reinterpret the opcode. When
codegened, it would fail to find the real instruction since it wasn't
in the right namespace.

Diff Detail

Event Timeline

arsenm created this revision.Jul 14 2020, 6:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 14 2020, 6:11 PM
foad added a comment.Jul 15 2020, 1:48 AM

Sounds great to me, but I'm not much of an expert on instruction definitions.

foad added a comment.Jul 15 2020, 3:04 AM

The real encoded version
was named _gfx9_gfx9.

FYI there are a few other instances of this oddity:

V_ADD_I32_gfx9_gfx9
V_DIV_FIXUP_F16_gfx9_gfx9
V_FMA_F16_gfx9_gfx9
V_INTERP_P2_F16_gfx9_gfx9
V_MAD_F16_gfx9_gfx9
V_MAD_I16_gfx9_gfx9
V_MAD_U16_gfx9_gfx9
V_SUB_I32_gfx9_gfx9

This revision is now accepted and ready to land.Jul 15 2020, 12:16 PM