This is an archive of the discontinued LLVM Phabricator instance.

[GISel]: Remove an incorrect assert in CallLowering
ClosedPublic

Authored by aditya_nandakumar on Aug 22 2018, 7:02 PM.

Details

Summary

Asserting if any extend of vectors should be up to the target's legalizer/target specific code.

I suspect this was moved around from AArch64 during refactoring and stayed as is in generic code.

This assert fires if we compile the following llvm ir
define <4 x i1> @foo() {
entry:

ret <4 x i1> zeroinitializer

}
llc -mtriple=x86_64-linux-gnu -o - -global-isel

If required I can add a test that IRTranslation for above doesn't crash and produces ANYEXT. I haven't added as this seemed overkill for removing an assert.

Diff Detail

Repository
rL LLVM

Event Timeline

If required I can add a test that IRTranslation for above doesn't crash and produces ANYEXT. I haven't added as this seemed overkill for removing an assert.

It uncovers a previously unsupported case so I think we should have a testcase for it

Thanks Daniel. Added test case.

dsanders accepted this revision.Sep 27 2018, 3:59 PM

Sorry for being so slow to get back to you on this. I hadn't realized I didn't say 'LGTM with a test case' or something to that effect.

LGTM

This revision is now accepted and ready to land.Sep 27 2018, 3:59 PM

Submitted in r343325