[SelectionDAG] Add computeKnownBits support for ISD::USUBSAT.
authorCraig Topper <craig.topper@sifive.com>
Sun, 7 Mar 2021 17:48:40 +0000 (09:48 -0800)
committerCraig Topper <craig.topper@sifive.com>
Sun, 7 Mar 2021 17:48:42 +0000 (09:48 -0800)
commit0eb405c3b8e2bef5f80499991d67a7bf9e419412
treeae9c40f0c7cbb41cd620c336452f27676f65b9e0
parentc91b3c9e63c3580348701a81a82740d84d2e5102
[SelectionDAG] Add computeKnownBits support for ISD::USUBSAT.

The result of ISD::USUBSAT will never be larger than the LHS. We
can use this to put a bound on the number of leading zeros.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D98133
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/test/CodeGen/AMDGPU/usubsat.ll
llvm/test/CodeGen/ARM/usub_sat.ll
llvm/test/CodeGen/ARM/usub_sat_plus.ll
llvm/test/CodeGen/RISCV/usub_sat.ll
llvm/test/CodeGen/X86/combine-sub-usat.ll
llvm/test/CodeGen/X86/usub_sat.ll
llvm/test/CodeGen/X86/usub_sat_plus.ll