OSDN Git Service

[CodeGen] Fix FCOPYSIGN legalization to account for mismatched types.
authorAhmed Bougacha <ahmed.bougacha@gmail.com>
Tue, 4 Aug 2015 00:32:55 +0000 (00:32 +0000)
committerAhmed Bougacha <ahmed.bougacha@gmail.com>
Tue, 4 Aug 2015 00:32:55 +0000 (00:32 +0000)
commit5ce70cc2c13ebe63faa4911e6f4e8771a1f5f39b
tree1274278ea87baf0db6130b7c11680c3e852fe8c2
parent1731b66081d90b924c048721774c4da99a016954
[CodeGen] Fix FCOPYSIGN legalization to account for mismatched types.

We used to legalize it like it's any other binary operations.  It's not,
because it accepts mismatched operand types.  Because of that, we used
to hit various asserts and miscompiles.

Specialize vector legalizations to, in the worst case, unroll, or, when
possible, to just legalize the operand that needs legalization.

Scalarization isn't covered, because I can't think of a target where
some but not all of the 1-element vector types are to be scalarized.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243924 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeTypes.h
lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
test/CodeGen/AArch64/vector-fcopysign.ll [new file with mode: 0644]