Page MenuHomePhabricator

[X86] Fix a bug with i386 subtarget in LowerCONCAT_VECTORSvXi1 func

Authored by uriel.k on Oct 9 2017, 8:20 AM.



Previously, did not consider i386 subtargets which led to a crash in legalization stage.

This is required before adding support for X86TESTM and X86TESTNM
for also eliminating zeroing upper bits redundant instructions.

Diff Detail

Event Timeline

uriel.k created this revision.Oct 9 2017, 8:20 AM
This revision is now accepted and ready to land.Oct 9 2017, 12:10 PM
RKSimon added a subscriber: RKSimon.

Test case?


Surely you could just use DAG.getIntPtrConstant(0, dl) ?

craig.topper added inline comments.Oct 9 2017, 1:38 PM

Should this just be calling getZeroVector?

m_zuckerman added a comment.EditedOct 9 2017, 11:33 PM

Test case?

This bug is covered by a test in check-llvm and after that @uriel.k will commit the next patch the case will be covered.

aymanmus added inline comments.Oct 10 2017, 12:30 AM

It's possible. But since the ZeroC has an additional use (cannot be removed), it will end up the same.

uriel.k updated this revision to Diff 118326.Oct 10 2017, 3:33 AM

Changed function to be DAG.getIntPtrConstant(0, dl) instead.

Test case is not possible right now as it crashes only after another patch that will add TESTM to
the list of instructions that zeroing the upper bits by default (much like PCMPEQ).

RKSimon accepted this revision.Oct 10 2017, 4:16 AM

LGTM with one minor


Please just use getZeroVector() for consistency.

uriel.k closed this revision.Oct 10 2017, 6:58 AM

Committed in rL315311. Sorry for the poor commit message, added a suitable message in comment in