OSDN Git Service

[x86,SDAG] Introduce any- and sign-extend-vector-inreg nodes analogous
authorChandler Carruth <chandlerc@gmail.com>
Thu, 10 Jul 2014 12:32:32 +0000 (12:32 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 10 Jul 2014 12:32:32 +0000 (12:32 +0000)
commitcdbdfa28d12a190b01e13dadf41e9bf8c7cdb26a
tree653f8508bae2758e77a5eff4e6639b0c935326c1
parent35dda8a53c15b8a8e6c6c6d5b82b02750c9f5cc2
[x86,SDAG] Introduce any- and sign-extend-vector-inreg nodes analogous
to the zero-extend-vector-inreg node introduced previously for the same
purpose: manage the type legalization of widened extend operations,
especially to support the experimental widening mode for x86.

I'm adding both because sign-extend is expanded in terms of any-extend
with shifts to propagate the sign bit. This removes the last
fundamental scalarization from vec_cast2.ll (a test case that hit many
really bad edge cases for widening legalization), although the trunc
tests in that file still appear scalarized because the the shuffle
legalization is scalarizing. Funny thing, I've been working on that.

Some initial experiments with this and SSE2 scenarios is showing
moderately good behavior already for sign extension. Still some work to
do on the shuffle combining on X86 before we're generating optimal
sequences, but avoiding scalarization is a huge step forward.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212714 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/ISDOpcodes.h
include/llvm/CodeGen/SelectionDAG.h
lib/CodeGen/SelectionDAG/LegalizeTypes.h
lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
lib/CodeGen/TargetLoweringBase.cpp
test/CodeGen/X86/vec_cast2.ll