[llvm] SCEV: return std::nullopt for invalid TC (NFC) (PR #94162)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 3 03:03:52 PDT 2024


nikic wrote:

> If the only planned use of this is to avoid printing `TC: 0` in LV, would it be possible to simply update the code in LV to check that the return value is != 0 before printing? IIUC 0 is never a valid return value for `getSmallConstantTripCount` and it should be fairly clear from the documentation.

Also, just to double check, is that `TC: 0` print really a bug and not intentional? I would have thought it is relevant debug information that the trip count could not be computed.

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


More information about the llvm-commits mailing list