This is an archive of the discontinued LLVM Phabricator instance.

DAG: Avoid bitcast/ext/build_vector combine
ClosedPublic

Authored by arsenm on May 22 2018, 10:38 AM.

Details

Summary

This avoids regressions in a future AMDGPU change
to make v4i16/v4f16 legal. For these types, build_vector
is implemented as bitcasted operations on v2i32. This
combine was creating v4i16s out of what would have been
already been a v2i32 build_vector, creating a mess
of nodes that never get cleaned up.

I'm not sure this is the right condition to check.
I initially tried just checking for the legality of the
new build_vector. This works for my case, but breaks dozens
of x86 tests. A Mips test seems to show some improvement
or at least a neutral change. I don't want to think
about how long it would take to analyze the set of
different x86 vector operations impacted.

Test included in future commit.

Diff Detail

Event Timeline

arsenm created this revision.May 22 2018, 10:38 AM

please add regression tests

please add regression tests

As noted in the message this can't be tested until a later commit

please add regression tests

As noted in the message this can't be tested until a later commit

Instead is it possible to add the dependent phab for v4i16/v4f16 legal types?

please add regression tests

As noted in the message this can't be tested until a later commit

Instead is it possible to add the dependent phab for v4i16/v4f16 legal types?

Done now

hliao accepted this revision.Jun 7 2018, 9:06 AM
This revision is now accepted and ready to land.Jun 7 2018, 9:06 AM
arsenm closed this revision.Jun 7 2018, 12:47 PM

r334218