[X86][SSE] Legal XMM Register Class ordering for SSE1
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 21 Nov 2015 12:38:34 +0000 (12:38 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 21 Nov 2015 12:38:34 +0000 (12:38 +0000)
commit1f6252f0b25b3aebf629db39c3d33606220f55a3
tree83677d093293c4721d18d6420ced770e88eae676
parent0977d4d4df7b3cee9cecfa696df15016ba38eb1b
[X86][SSE] Legal XMM Register Class ordering for SSE1

It turns out we have a number of places that just grab the first type attached to a register class for various reasons. This is fine unless for some reason that type isn't legal on the current target, such as for SSE1 which doesn't support v16i8/v8i16/v4i32/v2i64 - all of which were included before 4f32 in the class.

Given that this is such a rare situation I've just re-ordered the types and placed the float types first.

Fix for PR16133

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253773 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86RegisterInfo.td
test/CodeGen/X86/inline-sse.ll [new file with mode: 0644]