HomePhabricator

[DAGCombiner] Minor compile time improvement to (sext_in_reg…

Authored by craig.topper on Mar 21 2021, 10:44 AM.

Description

[DAGCombiner] Minor compile time improvement to (sext_in_reg (sign_extend_vector_inreg x)) optimization.

Don't bother calling ComputeNumSignBits if N00Bits < ExtVTBits. No
matter what answer we get back this will be true:
(N00Bits - DAG.ComputeNumSignBits(N00, DemandedSrcElts)) < ExtVTBits)

So we might as well save the computation. This makes the code more
consistent with the similar (sext_in_reg (sext x)) handling above.

Details

Committed
craig.topperMar 21 2021, 11:16 AM
Parents
rGd11d5d1c5f5a: [ValueTracking] Improve mul handling in isKnownNonEqual()
Branches
Unknown
Tags
Unknown