This is an archive of the discontinued LLVM Phabricator instance.

[SLP][NFC] Test showing a cost estimation issue caused by f82eb7e066f322a231627383fc80522d98ce6181
ClosedPublic

Authored by vporpo on Apr 19 2023, 11:21 AM.

Details

Summary

The buildvector cost for the case shown in the test should be 0 but it is -1, causing the code to get vectorized, whenit shouldn't.

Diff Detail

Event Timeline

vporpo created this revision.Apr 19 2023, 11:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 19 2023, 11:21 AM
vporpo requested review of this revision.Apr 19 2023, 11:21 AM
ABataev accepted this revision.Apr 19 2023, 12:36 PM

LG, with a nit.

llvm/test/Transforms/SLPVectorizer/X86/buildvector-float-and-extract-lane1.ll
5

Add a cost analysis to the test.

This revision is now accepted and ready to land.Apr 19 2023, 12:36 PM
vporpo added inline comments.Apr 19 2023, 12:44 PM
llvm/test/Transforms/SLPVectorizer/X86/buildvector-float-and-extract-lane1.ll
5

What do you mean?

ABataev added inline comments.Apr 19 2023, 12:52 PM
llvm/test/Transforms/SLPVectorizer/X86/buildvector-float-and-extract-lane1.ll
5

Check llvm/test/Transforms/SLPVectorizer/X86/extractelement-multiple-uses.ll as an example

vporpo updated this revision to Diff 515071.Apr 19 2023, 1:32 PM

Added remarks

vporpo added inline comments.Apr 19 2023, 1:33 PM
llvm/test/Transforms/SLPVectorizer/X86/buildvector-float-and-extract-lane1.ll
5

Is this getting updated automatically with update_test_checks.py? I had to add it by hand.

ABataev added inline comments.Apr 19 2023, 1:37 PM
llvm/test/Transforms/SLPVectorizer/X86/buildvector-float-and-extract-lane1.ll
5

IIRC, no, need to update it manually.

This revision was landed with ongoing or failed builds.Apr 19 2023, 2:33 PM
This revision was automatically updated to reflect the committed changes.