This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Combine FMIN_LEGACY/FMAX_LEGACY
ClosedPublic

Authored by arsenm on Jan 23 2020, 12:31 PM.

Details

Reviewers
nhaehnle
kerbowa
Summary

Try out using combine definition rules.

This really should be a post-legalizer combine, but the combiner pass
is currently pre-legalize. Most of the target combines are really
post-legalize, so we should probably move the pass.

Diff Detail

Event Timeline

arsenm created this revision.Jan 23 2020, 12:31 PM
kerbowa accepted this revision.Jan 30 2020, 11:11 PM

Is anything preventing from adding a post legalizer combiner pass then?

LGTM

This revision is now accepted and ready to land.Jan 30 2020, 11:11 PM

Is anything preventing from adding a post legalizer combiner pass then?

LGTM

Most of our target combines belong post-legalize and post-regbankselect. I'm mostly just unsure how to organize the 3 combiner passes which largely overlap. I'm not sure if we should juts have one combiner pass run in 3 different modes, or actually 3 distinct passes.

Most of our target combines belong post-legalize and post-regbankselect. I'm mostly just unsure how to organize the 3 combiner passes which largely overlap. I'm not sure if we should juts have one combiner pass run in 3 different modes, or actually 3 distinct passes.

Maybe go with 3 distinct passes that have some sort of common base / place where shared code can go?

llvm/lib/Target/AMDGPU/AMDGPUCombine.td
23

Should have been CI rather than VI.