This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][GlobalISel] Run SIAddImgInit
ClosedPublic

Authored by foad on Jan 21 2021, 6:34 AM.

Details

Summary

This pass is required to get correct codegen for image instructions with
the tfe or lwe bits set.

Diff Detail

Event Timeline

foad created this revision.Jan 21 2021, 6:34 AM
foad requested review of this revision.Jan 21 2021, 6:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 21 2021, 6:34 AM

I think it would make more sense to do this during instruction selection, rather than in a separate pass, but for now it seems easiest to just copy what selectiondag does and run the pass.

dstuttard accepted this revision.Jan 21 2021, 7:09 AM

This LGTM - but I agree with your comment that this should probably not be a separate pass.

This revision is now accepted and ready to land.Jan 21 2021, 7:09 AM
piotr added inline comments.Jan 21 2021, 7:11 AM
llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
1112

Add FIXME to move the functionality into instruction selection?

foad updated this revision to Diff 318192.Jan 21 2021, 7:15 AM

Add comment.

This revision was landed with ongoing or failed builds.Jan 21 2021, 7:56 AM
This revision was automatically updated to reflect the committed changes.