This is an archive of the discontinued LLVM Phabricator instance.

[X86][AsmParser][AVX512] Error appropriately when K0 is tried as a write-mask
ClosedPublic

Authored by coby on Aug 10 2017, 1:49 AM.

Details

Summary

K0 isn't expected as a write-mask, so provide a detailed error here, instead of the more generic one (invalid op for insn)
Conforms with gas

Diff Detail

Repository
rL LLVM

Event Timeline

coby created this revision.Aug 10 2017, 1:49 AM
m_zuckerman added inline comments.Aug 10 2017, 3:18 AM
lib/Target/X86/AsmParser/X86AsmParser.cpp
2092 ↗(On Diff #110528)

Why do you use a new RegLoc?

coby added inline comments.Aug 10 2017, 3:23 AM
lib/Target/X86/AsmParser/X86AsmParser.cpp
2092 ↗(On Diff #110528)

To acquire the start location of the register operand, so the location mark on ther error message will be correct

m_zuckerman accepted this revision.Aug 10 2017, 4:45 AM

It sounds reasonable
LGTM

This revision is now accepted and ready to land.Aug 10 2017, 4:45 AM
This revision was automatically updated to reflect the committed changes.