This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Don't set src mods on permlane16
ClosedPublic

Authored by Joe_Nash on Feb 21 2023, 1:36 PM.

Details

Summary

v_permlane16_b32 and v_permlanex16_b32 should not set abs and neg src
modifiers on any input, but they can set op_sel on src0 or src1 to
represent fi or bc when desired. The ISel patterns were setting
the src_modifier bits to -1, effectively setting abs and neg as well,
whenever it was intended to set op_sel, due to an error in ISel. ISel
should now correctly only set the op_sel bits.

Diff Detail

Event Timeline

Joe_Nash created this revision.Feb 21 2023, 1:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 21 2023, 1:36 PM
Joe_Nash requested review of this revision.Feb 21 2023, 1:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 21 2023, 1:36 PM
arsenm added inline comments.Feb 21 2023, 1:38 PM
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
5048

Why aren’t we using the imported pattern here?

Joe_Nash added inline comments.Feb 21 2023, 1:43 PM
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
5048

I'm not very familiar with this part of the codebase or how GISDNodeXFormEquiv works, so I don't know what you mean.

If I delete the function renderOpSelTImm I get the error when compiling
error: no member named 'renderOpSelTImm' in 'llvm::AMDGPUInstructionSelector'

arsenm accepted this revision.Feb 21 2023, 1:46 PM

Oh, it did import

This revision is now accepted and ready to land.Feb 21 2023, 1:46 PM
This revision was landed with ongoing or failed builds.Feb 22 2023, 8:42 AM
This revision was automatically updated to reflect the committed changes.