This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Add combine for trunc of bitcast from build_vector
ClosedPublic

Authored by arsenm on May 7 2018, 11:23 AM.

Details

Summary

If the truncate is only accessing the first element of the vector,
we can use the original source value.

This helps with some combine ordering issues after operations are
lowered to integer operations between bitcasts of build_vector.
In particular it stops unnecessarily materializing the unused
top half of a vector in some cases.

Diff Detail

Event Timeline

arsenm created this revision.May 7 2018, 11:23 AM
This revision is now accepted and ready to land.May 7 2018, 11:29 AM
arsenm closed this revision.May 9 2018, 11:41 AM

r331909