OSDN Git Service

LegalizeDAG: Implement promote for scalar_to_vector
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 10 Nov 2015 18:48:11 +0000 (18:48 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 10 Nov 2015 18:48:11 +0000 (18:48 +0000)
commita800198c3bf8aa3c49562382914ea3e3c30761a7
treed9361b917d13a48b7086bae8902f9d792019b07a
parentd4f15c711f0b2fb74c443bfb47cbc3393a1e5100
LegalizeDAG: Implement promote for scalar_to_vector

This allows avoiding the default Expand behavior which
introduces stack usage. Bitcast the scalar and replace
the missing elements with undef.

This is covered by existing tests and used by a future
commit which makes 64-bit vectors legal types on AMDGPU.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252632 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp