This is an archive of the discontinued LLVM Phabricator instance.

[X86] Remove isel predicates for xgetbv/xsetbv instructions so they can work on Windows.
ClosedPublic

Authored by craig.topper on Sep 1 2021, 2:57 PM.

Details

Summary

https://reviews.llvm.org/D56686 was supposed to allow these to
work on Windows without needing to enable the xsave feature to
match MSVC. It seems this didn't work because the backend isel
patterns would still block it.

This patch removes the predicates from the isel patterns.

Fixes PR51706.

Diff Detail

Event Timeline

craig.topper created this revision.Sep 1 2021, 2:57 PM
craig.topper requested review of this revision.Sep 1 2021, 2:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 1 2021, 2:57 PM
pengfei accepted this revision.Sep 2 2021, 9:37 AM

LGTM. Wild thought: is there any way that FE could handle it? e.g. append the xsave to function's feature attribute list for _xgetbv etc?

This revision is now accepted and ready to land.Sep 2 2021, 9:37 AM
This revision was landed with ongoing or failed builds.Sep 2 2021, 10:25 AM
This revision was automatically updated to reflect the committed changes.