This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][MC][GFX8+] Correct v_cndmask operand types
ClosedPublic

Authored by dp on Oct 18 2022, 3:15 AM.

Details

Summary

This is a follow up on https://reviews.llvm.org/D135900.
It turned out floating-point modifiers should be used with floating-point operands, otherwise an assert may be triggered. The issue manifests itself with e32 and sdwa variants, for example:

v_cndmask_b32_e32 v5, |-4.0|, v2, vcc

The patch corrects operand types and adds more tests.

Diff Detail

Event Timeline

dp created this revision.Oct 18 2022, 3:15 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 18 2022, 3:15 AM
dp requested review of this revision.Oct 18 2022, 3:15 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 18 2022, 3:15 AM
rampitec accepted this revision.Oct 18 2022, 11:59 AM
This revision is now accepted and ready to land.Oct 18 2022, 11:59 AM

I thought modifiers did work with cndmask. Is the issue just combining inline immediate with the modifiers?

dp added a comment.Oct 18 2022, 12:33 PM

I thought modifiers did work with cndmask. Is the issue just combining inline immediate with the modifiers?

Yes, the issue only manifests itself with modifiers applied to inline constants.

Perhaps EnableF32SrcMods is now unused. It loosks like it was only used for VOP2e_SGPR. Can it be removed?

dp updated this revision to Diff 469040.Oct 19 2022, 2:10 PM

Remove EnableF32SrcMods.

This revision was landed with ongoing or failed builds.Oct 20 2022, 5:10 AM
This revision was automatically updated to reflect the committed changes.