This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] Look through extends etc in CombinerHelper::matchConstantOp
ClosedPublic

Authored by paquette on Jun 15 2020, 1:28 PM.

Details

Summary

It's possible to end up with a zext or something in the way of a G_CONSTANT, even pre-legalization. This can happen with memsets.

e.g.

https://godbolt.org/z/Bjc8cw

To make sure we can catch these cases, use getConstantVRegValWithLookThrough instead of mi_match.

Diff Detail

Event Timeline

paquette created this revision.Jun 15 2020, 1:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2020, 1:28 PM
aemerson accepted this revision.Jun 15 2020, 3:02 PM
This revision is now accepted and ready to land.Jun 15 2020, 3:02 PM
This revision was automatically updated to reflect the committed changes.