This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombiner] Fix crash for the merge stores with different value type
ClosedPublic

Authored by bcl5980 on Oct 14 2022, 2:48 AM.

Details

Summary

The crash case comes from #58350. It have two stores, one store is type f32 and the other is v1f32.
When we try to merge these two stores on v1f32, the memVT is vector type so the old code will use ISD::EXTRACT_SUBVECTOR for type f32 also then compiler crash.
So this patch insert a build_vector for f32 store to generate v1f32 also when memVT is v1f32.

Diff Detail

Event Timeline

bcl5980 created this revision.Oct 14 2022, 2:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 14 2022, 2:48 AM
bcl5980 requested review of this revision.Oct 14 2022, 2:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 14 2022, 2:48 AM
RKSimon added inline comments.Oct 14 2022, 2:54 AM
llvm/test/CodeGen/AArch64/dag-combine-store-merge.ll
6 ↗(On Diff #467718)

I'm not sure this is useful - a short description similar to your patch summary might be better

29 ↗(On Diff #467718)

Rename PR58350 to help us keep track

bcl5980 updated this revision to Diff 467724.Oct 14 2022, 3:19 AM

address comments by @RKSimon

bcl5980 marked 2 inline comments as done.Oct 14 2022, 3:19 AM
RKSimon accepted this revision.Oct 14 2022, 8:21 AM

LGTM

This revision is now accepted and ready to land.Oct 14 2022, 8:21 AM