This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Directly implement computeKnownBits for workitem intrinsics
ClosedPublic

Authored by arsenm on Nov 13 2017, 10:41 PM.

Details

Reviewers
rampitec
Summary

Currently metadata is inserted in a late pass which is lowered
to an AssertZext. The metadata would be more useful if it was
inserted earlier after inlining, but before codegen.

Probably shouldn't change anything now. Just replacing the
late metadata annotation needs more work, since we lose
out on optimizations after these are lowered to CopyFromReg.

Seems to be slightly better than relying on the AssertZext from the
metadata. The test change in cvt_f32_ubyte.ll is a quirk from it using
-start-before=amdgpu-isel instead of running the usual codegen
pipeline.

Diff Detail

Event Timeline

arsenm created this revision.Nov 13 2017, 10:41 PM
rampitec added inline comments.Nov 14 2017, 9:50 AM
lib/Target/AMDGPU/AMDGPUSubtarget.cpp
357 ↗(On Diff #122775)

You probably need to check isa<LoadInst>(I) here.

arsenm updated this revision to Diff 423127.Apr 15 2022, 10:04 AM
arsenm edited the summary of this revision. (Show Details)

Rebase 5 years. Seems to do a slightly better job

Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 15 2022, 10:04 AM
This revision is now accepted and ready to land.Apr 15 2022, 10:13 AM