This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add checking of the scale argument to scatter/gather builtins
ClosedPublic

Authored by craig.topper on Mar 12 2017, 3:29 PM.

Details

Summary

The only valid values for the scale immediate of scatter/gather builtins are 1, 2, 4, or 8. This patch enforces this in the frontend otherwise we generate invalid instruction encodings in the backend.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Mar 12 2017, 3:29 PM
craig.topper edited subscribers, added: cfe-commits; removed: llvm-commits.Mar 12 2017, 3:31 PM
igorb accepted this revision.Mar 13 2017, 12:55 AM

LGTM,
Could you please add test that check scale and hint parameter errors for BI__builtin_ia32_gatherpfdpd for example.

This revision is now accepted and ready to land.Mar 13 2017, 12:55 AM
This revision was automatically updated to reflect the committed changes.