[ARM] Compute known bits for ARMISD::CMOV
authorJames Molloy <james.molloy@arm.com>
Thu, 5 Nov 2015 15:21:58 +0000 (15:21 +0000)
committerJames Molloy <james.molloy@arm.com>
Thu, 5 Nov 2015 15:21:58 +0000 (15:21 +0000)
commitccdfbf603c948558be678544811ea6651be644cb
treefb9bfab2d3813963934803068497264beea85b00
parent0ef0b3e8817242de6720adc88996f6a912db7571
[ARM] Compute known bits for ARMISD::CMOV

We can conservatively know that CMOV's known bits are the intersection of known bits for each of its operands. This helps PerformCMOVToBFICombine find more opportunities.

I tried hard to create a testcase for this and failed - we have to sufficiently confuse DAG.computeKnownBits which can see through all the cheap tricks I tried to narrow my larger testcase down :(

This code is actually exercised in CodeGen/ARM/bfi.ll, there's just no functional difference because DAG.computeKnownBits gets the right answer in that case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252168 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelLowering.cpp