Page MenuHomePhabricator

[X86] Fix bug in legalize vector types - Split large loads
ClosedPublic

Authored by aymanmus on Oct 3 2017, 12:50 AM.

Details

Summary

When splitting a large load to smaller legally-typed loads, the last load should be padded to reach the size of the previous one so a CONCAT_VECTORS node could reunite them again.
The code currently pads the last load to reach the size of the first load (instead of the previous).

Diff Detail

Repository
rL LLVM

Event Timeline

aymanmus created this revision.Oct 3 2017, 12:50 AM
RKSimon edited edge metadata.Oct 6 2017, 4:40 AM

Does this fix PR27708 as well?

The bug was filed for Clang's 3.8 version, it passed with clang-4.0 and clang-ToT (top of trunc).
Seems like the issue was fixed while ago.

The bug was filed for Clang's 3.8 version, it passed with clang-4.0 and clang-ToT (top of trunc).
Seems like the issue was fixed while ago.

Confirmed I added a test case at rL315186

Possibly add a test case for PR34657 as well? @zvi has already reduced much of it

test/CodeGen/X86/pr34653.ll
1 ↗(On Diff #117482)

Add a triple, also I realise its an assertion test but it doesn't usually hurt to try and create FileChecks for a test

aymanmus updated this revision to Diff 119845.Oct 23 2017, 6:49 AM

Adding triple & a test case for PR23657

RKSimon added inline comments.
test/CodeGen/X86/pr34653-pr34657.ll
314 ↗(On Diff #119845)

I have a feeling this will reduce further - bugpoint typically stops a little early.

aymanmus updated this revision to Diff 120740.Oct 29 2017, 1:22 AM

Manually reducing "bugpointed" test.

RKSimon added inline comments.Oct 29 2017, 4:19 AM
test/CodeGen/X86/pr34653-pr34657.ll
3 ↗(On Diff #120740)

Why the difference in attributes?

aymanmus added inline comments.Oct 29 2017, 6:09 AM
test/CodeGen/X86/pr34653-pr34657.ll
3 ↗(On Diff #120740)

To reproduce both of the bugs as they were filed.

RKSimon accepted this revision.Nov 2 2017, 3:11 AM

LGTM once the tests have been split up

test/CodeGen/X86/pr34653-pr34657.ll
3 ↗(On Diff #120740)

OK - please can you just split these into 2 test files. pr34653.ll and pr34657.ll

This revision is now accepted and ready to land.Nov 2 2017, 3:11 AM
aymanmus added inline comments.Nov 2 2017, 6:04 AM
test/CodeGen/X86/pr34653-pr34657.ll
3 ↗(On Diff #120740)

Done. Thanks

This revision was automatically updated to reflect the committed changes.