This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Avoid using 64-bit shift for i64 (shl x, 32)
ClosedPublic

Authored by arsenm on Jul 3 2015, 4:32 PM.

Details

Reviewers
tstellarAMD
Summary

This can be done only with moves which theoretically
will optimize better later.

Although this transform increases the instruction count,
it should be code size / cycle count neutral in the worst
VALU case. It also seems to slightly improve a couple
of testcases due to other DAG combines this exposes.

This is probably slightly worse for the SALU case, so
it might be better to handle this during moveToVALU,
although then you lose some simplifications like
the load width reducing in the simple testcase.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 29038.Jul 3 2015, 4:32 PM
arsenm retitled this revision from to AMDGPU: Avoid using 64-bit shift for i64 (shl x, 32).
arsenm updated this object.
arsenm added a subscriber: llvm-commits.
arsenm updated this revision to Diff 29049.Jul 4 2015, 10:54 AM

Use truncate instead of extract_element x, 0
Add tests for lshr x, 32 case

This revision is now accepted and ready to land.Jul 14 2015, 7:09 AM
arsenm closed this revision.Jul 14 2015, 11:20 AM

r242177