This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Fix v2i8->i16 bitcast legalization.
ClosedPublic

Authored by ab on Nov 18 2014, 6:39 AM.

Details

Summary

r213378 improved f16 bitcasts, so that they go directly through subregs,
instead of through the stack. That code now causes an assertion failure
for bitcasts from other 16-bits types (most importantly v2i8).

Correct that by doing the custom lowering for i16 bitcasts only when the
input is an f16.

Part of PR21549.

Diff Detail

Repository
rL LLVM

Event Timeline

ab updated this revision to Diff 16331.Nov 18 2014, 6:39 AM
ab retitled this revision from to [AArch64] Fix v2i8->i16 bitcast legalization..
ab updated this object.
ab edited the test plan for this revision. (Show Details)
ab added a reviewer: t.p.northover.
ab added a subscriber: Unknown Object (MLST).
t.p.northover edited edge metadata.Nov 19 2014, 2:08 PM

Hi Ahmed,

Does that test manage to hit both changes? Other than that, it looks fine.

Cheers.

Tim.

ab added a comment.Dec 1 2014, 11:41 AM

Nope, the test only covers the ReplaceBITCASTResults change, the other one was for consistency, really.
I don't think we can hit that assert: from what I've seen, stuff like "bitcast <2 x i8> to half" is legalized elsewhere and wouldn't reach that function.

I can remove that change, what do you think?

-Ahmed

t.p.northover accepted this revision.Dec 1 2014, 12:28 PM
t.p.northover edited edge metadata.

I think I'd probably leave it be then. If we ever hit the assert we'll have a better understanding of why (and what we need to do about it).

Other than that, it looks fine.

Cheers.

Tim.

This revision is now accepted and ready to land.Dec 1 2014, 12:28 PM
ab closed this revision.Dec 1 2014, 12:53 PM
ab updated this revision to Diff 16781.

Closed by commit rL223074 (authored by @ab).