This is an archive of the discontinued LLVM Phabricator instance.

[X86]Fix wrong asm match for VMASKMOVDQU
ClosedPublic

Authored by XinWang10 on May 17 2023, 7:37 PM.

Details

Summary

VMASKMOVDQU supports 32bit/64bit version in 64bitmode, previously we prefer to use VMASKMOVDQU64 in 64bitmode because the 32bit one need 0x67 prefix.
After D150436, asm match table changed a little, which makes in 64bit mode "vmaskmovdqu %xmm0, %xmm1" will match VMASKMOVDQU other than VMASKMOVDQU64, this patch correct the asm match order for this instruction.

Diff Detail

Event Timeline

XinWang10 created this revision.May 17 2023, 7:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 17 2023, 7:37 PM
XinWang10 requested review of this revision.May 17 2023, 7:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 17 2023, 7:37 PM
XinWang10 edited the summary of this revision. (Show Details)May 17 2023, 7:41 PM
XinWang10 added reviewers: skan, pengfei.
skan added a comment.May 17 2023, 8:08 PM

Although I know your point, but please explain why we'd like to match VMASKMOVDQU64 in the summary.

XinWang10 edited the summary of this revision. (Show Details)May 17 2023, 8:23 PM
skan accepted this revision.May 17 2023, 8:31 PM

LGTM

This revision is now accepted and ready to land.May 17 2023, 8:31 PM
This revision was automatically updated to reflect the committed changes.
craig.topper added inline comments.
llvm/lib/Target/X86/X86InstrSSE.td
4091

Does the same bug exist for the SSE version?

XinWang10 added inline comments.May 17 2023, 10:33 PM
llvm/lib/Target/X86/X86InstrSSE.td
4091

Exactly! Will give another patch to fix it.