This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Unit test for trunc lowering from i64 to i8
ClosedPublic

Authored by nilanjana_basu on Sep 28 2022, 3:59 PM.

Details

Summary

This test is added so that it can be updated when 'trunc' lowering is extended to use AArch64 'tbl' instructions.

Diff Detail

Event Timeline

nilanjana_basu created this revision.Sep 28 2022, 3:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 28 2022, 3:59 PM
nilanjana_basu requested review of this revision.Sep 28 2022, 3:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 28 2022, 3:59 PM
fhahn added a comment.Sep 29 2022, 1:39 AM

Thanks for the patch! Could you also adda additional tests with trunc to odd types, something like <8 x i11> and <9 x i8>, to make sure we don't crash on those?

Added two test cases for <11 x i64> to <11 x i8> & <8 x i19> to <8 x i8>.

fhahn accepted this revision.Sep 30 2022, 7:45 AM

LGTM, thanks!

llvm/test/CodeGen/AArch64/trunc-to-tbl.ll
320

nit: remove newline here

384

nit: remove newline here

464

nit: remove newline here

484

nit: remove newline here

548

nit: remove newline here

This revision is now accepted and ready to land.Sep 30 2022, 7:45 AM

Removed the extra newlines

Removed extra newlines

nilanjana_basu accepted this revision.Sep 30 2022, 10:51 AM
nilanjana_basu marked 5 inline comments as done.