This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Fix i16 arithmetic pattern redundancy
ClosedPublic

Authored by arsenm on Oct 7 2019, 8:43 AM.

Details

Reviewers
rampitec
kzhuravl
Summary

There were 2 problems here. First, these patterns were duplicated to
handle the inverted shift operands instead of using the commuted
PatFrags.

Second, the point of the zext folding patterns don't apply to the
non-0ing high subtargets. They should be skipped instead of inserting
the extension. The zeroing high code would be emitted when necessary
anyway. This was also emitting unnecessary zexts in cases where the
high bits were undefined.

Diff Detail

Event Timeline

arsenm created this revision.Oct 7 2019, 8:43 AM
This revision is now accepted and ready to land.Oct 7 2019, 10:35 AM
arsenm closed this revision.Oct 8 2019, 10:34 AM

r374092