OSDN Git Service

[X86] Cleanup convertIntLogicToFPLogic a little. NFCI
authorCraig Topper <craig.topper@intel.com>
Wed, 5 Jun 2019 01:00:34 +0000 (01:00 +0000)
committerCraig Topper <craig.topper@intel.com>
Wed, 5 Jun 2019 01:00:34 +0000 (01:00 +0000)
commit4014b2ef32789d32d27ae3b581a715901e8aafc2
tree2d3016bd9a91985bf8ab18ebb85fea18d4074a62
parent0f41426ed64a254746ed177d15011b5230c0167b
[X86] Cleanup convertIntLogicToFPLogic a little. NFCI

-Use early returns to reduce indentation
-Replace multipe ifs with a switch.
-Replace an assert with an llvm_unreachable default in the switch.
-Check that the FP type we're going to use for the
 X86ISD::FAND/FOR/FXOR is legal rather than checking that the
 integer type matches the width of a legal scalar fp type. This all
 runs after legalization so it shouldn't really matter, but making
 sure we're using a valid type in the X86ISD node is really
 whats important.

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