[llvm] [RISCV][TTI] Add checks for invalid cast operations (PR #88854)

Shih-Po Hung via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 16 18:45:57 PDT 2024


arcbbb wrote:

> If I'm reading the code and discussion right, the LV is querying a truncate with result wider than source? If so, this does not seem like the right fix. If LV is querying an invalid argument combination, that's a LV bug and should be fixed as such.

Yes, the actual root cause is LV cost model. I think for TTI cost it is better to return invalid cost or delegate it to the base TTI rather than crash on it, 

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


More information about the llvm-commits mailing list