[AMDGPU] CodeGen: check dst operand type to determine if omod is supported for VOP3 instructions
ClosedPublic

Authored by SamWot on Thu, Jul 13, 4:47 AM.

Details

Summary

Previously, CodeGen checked first src operand type to determine if omod is supported by instruction. This isn't correct for some instructions: e.g. V_CMP_EQ_F32 has floating-point src operands but doesn't support omod.
Changed .td files to check dst operand type instead of src operand.

Diff Detail

Repository
rL LLVM
SamWot created this revision.Thu, Jul 13, 4:47 AM
SamWot edited the summary of this revision. (Show Details)Thu, Jul 13, 4:48 AM
SamWot added a subscriber: Restricted Project.

There should be an assembler test for omod being rejected with these. Doesn't the same also apply for clamp?

SamWot updated this revision to Diff 106637.Fri, Jul 14, 6:56 AM

Added assembler tests

There should be an assembler test for omod being rejected with these. Doesn't the same also apply for clamp?

I added some assembler tests.
There are some differences with clamp: since GFX8 clamp is allowed in VOPC instructions and instructions with integer output.

arsenm accepted this revision.Fri, Jul 14, 10:01 AM

LGTM

This revision is now accepted and ready to land.Fri, Jul 14, 10:01 AM
This revision was automatically updated to reflect the committed changes.