Dimitry Andric db417b6d40 Fix incorrect selection of AVX512 sqrt when OptForSize is on
Summary:
When optimizing for size, sqrt calls can be incorrectly selected as
AVX512 VSQRT instructions.  This is because X86InstrAVX512.td has a
`Requires<[OptForSize]>` in its `avx512_sqrt_scalar` multiclass
definition.  Even if the target does not support AVX512, the class can
apparently still be chosen, leading to an incorrect selection of
`vsqrtss`.

In PR26625, this lead to an assertion: Reg >= X86::FP0 && Reg <=
X86::FP6 && "Expected FP register!", because the `vsqrtss` instruction
requires an XMM register, which is not available on i686 CPUs.

Reviewers: grosbach, resistor, joker.eph

Subscribers: spatel, emaste, llvm-commits

Differential Revision: http://reviews.llvm.org/D17414

llvm-svn: 261360
2016-02-19 20:14:11 +00:00
..
2016-01-26 00:03:25 +00:00
2014-10-16 20:00:02 +00:00
2014-12-15 22:34:58 +00:00
2016-01-26 18:22:50 +00:00
2016-01-16 15:25:02 +00:00
2016-01-16 15:25:02 +00:00
2015-11-30 19:04:19 +00:00
2016-01-05 00:48:16 +00:00
2015-04-06 22:29:07 +00:00
2015-04-06 22:29:07 +00:00
2015-03-06 20:51:25 +00:00
2015-09-29 22:09:16 +00:00
2015-01-08 07:57:27 +00:00
2014-05-06 01:20:42 +00:00
2016-01-26 00:03:25 +00:00
2015-11-24 22:09:31 +00:00
2015-08-25 07:42:09 +00:00
2015-06-02 22:33:30 +00:00
2015-05-28 22:12:27 +00:00
2014-12-03 02:08:38 +00:00
2014-12-03 02:08:38 +00:00
2016-02-18 18:44:33 +00:00
2015-12-16 11:22:37 +00:00
2015-12-16 11:22:37 +00:00
2015-02-05 23:52:12 +00:00
2016-02-18 18:44:33 +00:00
2016-02-18 18:44:33 +00:00
2015-01-26 21:28:32 +00:00
2016-02-15 17:57:40 +00:00
2015-12-05 19:54:59 +00:00
2015-08-28 17:19:54 +00:00
2015-12-12 12:52:52 +00:00
2015-02-11 15:00:19 +00:00
2015-03-06 21:30:18 +00:00
2015-03-06 20:38:55 +00:00
2015-03-06 20:46:16 +00:00
2015-02-11 14:58:25 +00:00
2015-08-19 16:17:08 +00:00