[llvm] [RISCV] Match (ext (op a, b)) to (wop a, b) (PR #137508)

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 27 04:27:47 PDT 2025


wangpc-pp wrote:

> > If there is a risk of overflow, is it correct to match `(ext (op a, b))` to `(wop a, b)`?
> 
> Yes, you are right. This transformation is not correct.

Is there a mechanism to analyze if the result won't overflow? Apparently for ABD cases this holds, but how to detect such cases?

https://github.com/llvm/llvm-project/pull/137508


More information about the llvm-commits mailing list