This is an archive of the discontinued LLVM Phabricator instance.

[DAG] Handle build_vector with all undefs in reduceBuildVecTruncToBitCast
ClosedPublic

Authored by Pierre-vh on Feb 13 2023, 1:20 AM.

Details

Summary

While working on D143731 I hit a case where a build_vector with 2 undef operands could be generated (with one undef hidden behind a bitcast).
That made reduceBuildVecTruncToBitCast crash because it seems to assume there is at least one good operand.

Diff Detail

Event Timeline

Pierre-vh created this revision.Feb 13 2023, 1:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 13 2023, 1:20 AM
Pierre-vh requested review of this revision.Feb 13 2023, 1:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 13 2023, 1:20 AM
arsenm accepted this revision.Feb 13 2023, 11:09 AM
arsenm added inline comments.
llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.ll
875 ↗(On Diff #496864)

Shouldn't use anonymous values in tests

914 ↗(On Diff #496864)

Can this not reduce at all?

This revision is now accepted and ready to land.Feb 13 2023, 11:09 AM

Reduce test, move test elsewhere (as it doesn't have a bitcast anymore)

Pierre-vh marked 2 inline comments as done.Feb 13 2023, 11:52 PM
This revision was landed with ongoing or failed builds.Feb 13 2023, 11:52 PM
This revision was automatically updated to reflect the committed changes.