Yingwei Zheng 4793c2c3de
[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`.
2023-09-12 19:02:35 +08:00
..
2023-07-13 12:22:06 -07:00
2023-03-29 20:55:51 +01:00
2023-09-01 19:45:03 -04:00
2023-03-21 18:52:05 -07:00
2023-03-21 18:52:05 -07:00
2023-03-23 12:32:25 +00:00