This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Use splat vectors for undefs when folding canonicalize
ClosedPublic

Authored by arsenm on Aug 11 2018, 12:59 AM.

Details

Reviewers
rampitec
Summary

If one of the elements is undef, use the canonicalized constant
from the other element instead of 0.

Splat vectors are more useful for other optimizations, such
as matching vector clamps. This was breaking on clamps
of half3 from the undef 4th component.

Diff Detail

Event Timeline

arsenm created this revision.Aug 11 2018, 12:59 AM
rampitec accepted this revision.Aug 12 2018, 12:29 AM

LGTM except comment typo.

lib/Target/AMDGPU/SIISelLowering.cpp
7016

typo: and

This revision is now accepted and ready to land.Aug 12 2018, 12:29 AM
arsenm closed this revision.Aug 12 2018, 1:43 AM

r339512