X86: deduplicate V[SZ]EXT_MOVL and V[SZ]EXT nodes
authorTim Northover <tnorthover@apple.com>
Thu, 6 Feb 2014 09:54:51 +0000 (09:54 +0000)
committerTim Northover <tnorthover@apple.com>
Thu, 6 Feb 2014 09:54:51 +0000 (09:54 +0000)
commitc0fc62c2f9b10f05bc055f78480d7e393393682f
tree8aa87af5ab7d95c6a17bddbac74aac3bf11342ff
parent9f2252fe472f38cbc04af275950175019733e2ae
X86: deduplicate V[SZ]EXT_MOVL and V[SZ]EXT nodes

I believe VZEXT_MOVL means "zero all vector elements except the first" (and
should have identical input & output types) whereas VZEXT means "zero extend
each element of a vector (discarding higher elements if necessary)".

For example:
    (v4i32 (vzext (v16i8 ...)))

should zero extend the low 4 bytes of the incoming vector to 32-bits,
discarding higher bytes.

However, somewhere in the past, these two concepts had become confused, even
leading to a nonsensical VSEXT_MOVL.

This re-merges the nodes where appropriate (all VSEXT_MOVL -> VSEXT, VZEXT_MOVL
-> VZEXT when it's an actual extension).

rdar://problem/15981990

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200918 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86InstrFragmentsSIMD.td
lib/Target/X86/X86InstrSSE.td