This is an archive of the discontinued LLVM Phabricator instance.

[X86] Emit a reg-reg copy for fast isel of vector bitcasts.
ClosedPublic

Authored by craig.topper on Jun 24 2020, 6:02 PM.

Details

Summary

Previously we just update a map and moved on. But it possible
we cached known bits information with the vreg that can be used by
another basic block. If the other basic block has a different view
of the VT these known bits won't make sense.

By emitting a copy we ensure we have different vregs before and
after the bitcast. This prevents the known bits from being used
with the wrong type.

Diff Detail

Event Timeline

craig.topper created this revision.Jun 24 2020, 6:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 24 2020, 6:02 PM
Herald added a subscriber: hiraditya. · View Herald Transcript

Add comment to the X86FastISel.cpp

echristo accepted this revision.Jun 24 2020, 6:40 PM

I think this is the right solution, we need to emit the instruction either way and then hopefully we won't fall out, but if we do we're not leaving mistaken state.

-eric

This revision is now accepted and ready to land.Jun 24 2020, 6:40 PM
This revision was automatically updated to reflect the committed changes.