ARM64: use regalloc-friendly COPY_TO_REGCLASS for bitcasts
authorTim Northover <tnorthover@apple.com>
Fri, 4 Apr 2014 09:03:09 +0000 (09:03 +0000)
committerTim Northover <tnorthover@apple.com>
Fri, 4 Apr 2014 09:03:09 +0000 (09:03 +0000)
commit0eb313be18c9fd66459060b6a447908c7a46c123
tree81b7bb9663ac41d6cf64b9e5707a45bfb3865c23
parent604dff27c96bc7cb22de061d737eaf2a24df9e01
ARM64: use regalloc-friendly COPY_TO_REGCLASS for bitcasts

The previous patterns directly inserted FMOV or INS instructions into
the DAG for scalar_to_vector & bitconvert patterns. This is horribly
inefficient and can generated lots more GPR <-> FPR register traffic
than necessary.

It's much better to emit instructions the register allocator
understands so it can coalesce the copies when appropriate.

It led to at least one ISelLowering hack to avoid the problems, which
was incorrect for v1i64 (FPR64 has no dsub). It can now be removed
entirely.

This should also fix PR19331.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205616 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM64/ARM64ISelLowering.cpp
lib/Target/ARM64/ARM64InstrInfo.td
test/CodeGen/ARM64/vaddv.ll