[SelectionDAG] Support 'bit preserving' floating points bitcasts on computeKnownBits...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 28 Oct 2017 14:27:53 +0000 (14:27 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 28 Oct 2017 14:27:53 +0000 (14:27 +0000)
commitd09c1ac20f908675dde9fec43808e5d661e165ac
tree5f1a065cdb31bd3caa54365ce614c627bf234351
parent1496d188a07124f09589cdba0bd8cb8c58ade8be
[SelectionDAG] Support 'bit preserving' floating points bitcasts on computeKnownBits/ComputeNumSignBits

For cases where we know the floating point representations match the bitcasted integer equivalent, allow bitcasting to these types.

This is especially useful for the X86 floating point compare results which return all/zero bits but as a floating point type.

Differential Revision: https://reviews.llvm.org/D39289

llvm-svn: 316831
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/test/CodeGen/X86/avx512-vec-cmp.ll
llvm/test/CodeGen/X86/bitcast-and-setcc-256.ll
llvm/test/CodeGen/X86/bitcast-and-setcc-512.ll
llvm/test/CodeGen/X86/cast-vsel.ll
llvm/test/CodeGen/X86/combine-fcopysign.ll
llvm/test/CodeGen/X86/machine-cp.ll
llvm/test/CodeGen/X86/vector-compare-results.ll