HomePhabricator

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

Authored by craig.topper on Mar 13 2017, 10:16 AM.

Description

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

The only valid values for 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.

Differential Revision: https://reviews.llvm.org/D30875

llvm-svn: 297642