This is an archive of the discontinued LLVM Phabricator instance.

[X86] Adding a check against i64 inputs in combineScalarToVector
ClosedPublic

Authored by mike.dvoretsky on Jun 20 2018, 7:23 AM.

Details

Summary

This patch adds checks to prevent creating scalar_to_vector DAG nodes with i64 inputs when folding scalar masking, fixing PR37879.

Diff Detail

Repository
rL LLVM

Event Timeline

mike.dvoretsky created this revision.Jun 20 2018, 7:23 AM
craig.topper added inline comments.Jun 20 2018, 9:52 AM
llvm/lib/Target/X86/X86ISelLowering.cpp
39127 ↗(On Diff #152081)

You should probably just check for i8 and i32. I'm not sure anything prevents illegal types from getting here. Which might get legalized into i64 or i16 and be just as broken.

39142 ↗(On Diff #152081)

Same here

mike.dvoretsky marked 2 inline comments as done.

Changed the type checks to ensure that the input has a valid type, rather than guarding against specific invalid types.

This revision is now accepted and ready to land.Jun 21 2018, 9:33 AM
This revision was automatically updated to reflect the committed changes.