[DAGCombiner][RISCV] Prefer to sext i32 non-negative values (#65984)
By default, `DAGCombiner` folds `sext x` to `zext x` when `x` is non-negative. It will generate redundant `zext` inst seq on riscv64 (typically `slli (srli x, 32), 32`). godbolt: https://godbolt.org/z/osf6adP1o This patch applies the transform iff `zext` is **cheaper** than `sext`.
Loading
Please sign in to comment