[SelectionDAG][X86] Support inline assembly returning an mmx register into a type...
authorCraig Topper <craig.topper@intel.com>
Mon, 6 May 2019 19:50:14 +0000 (19:50 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 6 May 2019 19:50:14 +0000 (19:50 +0000)
commitad56843dd780711fea6228fb672d7e56af74cb12
tree186cd3774ca4673d79f0240a4c4ce640a5b68011
parent3d1128cc9e16db43edf04f4e60df741351f94c2e
[SelectionDAG][X86] Support inline assembly returning an mmx register into a type with fewer than 64 bits.

It's possible to use the 'y' mmx constraint with a type narrower than 64-bits.

This patch supports this by bitcasting the mmx type to 64-bits and then
truncating to the desired type.

There are probably other missing type combinations we need to support, but this
is the case we have a bug report for.

Fixes PR41748.

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

llvm-svn: 360069
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/test/CodeGen/X86/pr41748.ll [new file with mode: 0644]