This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Make f16 ConstantFP legal
ClosedPublic

Authored by arsenm on Dec 2 2016, 10:20 PM.

Details

Reviewers
tstellarAMD
Summary

Not having this legal led to combine failures, resulting
in dumb things like bitcasts of constants not being folded
away.

The only reason I'm leaving the v_mov_b32 hack that f32
already uses is to avoid madak formation test regressions.
PeepholeOptimizer has an ordering issue where the immediate
fold attempt is into the sgpr->vgpr copy instead of the actual
use. Running it twice avoids that problem.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 80169.Dec 2 2016, 10:20 PM
arsenm retitled this revision from to AMDGPU: Make f16 ConstantFP legal.
arsenm updated this object.
arsenm added a subscriber: llvm-commits.
tstellarAMD accepted this revision.Dec 6 2016, 12:35 PM
tstellarAMD edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Dec 6 2016, 12:35 PM
arsenm closed this revision.Dec 8 2016, 12:25 PM

r289096