]> granicus.if.org Git - llvm/commit
[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)
commit6b9cd72c1b55445eaa9efbe894966ce56a1d2597
tree9bdb5241f021871dbcd36056e83b10bf2335f628
parent4ad9ccc7ee2702fde869a9d9196770695672bd93
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360069 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
test/CodeGen/X86/pr41748.ll [new file with mode: 0644]