HomePhabricator

[SelectionDAG][RISCV] Teach ComputeNumSignBits to handle SREM.

Authored by craig.topper on Feb 21 2021, 11:13 AM.

Description

[SelectionDAG][RISCV] Teach ComputeNumSignBits to handle SREM.

This also removes a pattern from RISCV that is no longer needed
since the sexti32 on the LHS of the srem in the pattern implies
the result is sign extended so the sign_extend_inreg should be
removed in DAG combine now.

Reviewed By: luismarques, RKSimon

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