[llvm] [APInt] Assert correct values in APInt constructor (PR #80309)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 15 06:08:54 PST 2024


nikic wrote:

> Is the plan to set implicitTrunc in so many places or is this part of tracking down all the regressions?

Apart from a couple marked TODO, most of them are here to stay. E.g. that bit of code in ConstantFolding has "sext or trunc" semantics, so doing something like "isSigned = true, implicitTrunc = true" there makes sense.

Some of them could be avoided, but it's not really clear that it's worthwhile/desirable. E.g. the one in FuzzMutate/OpDescriptor really doesn't really care about the actual value, so doing a truncation is as good as anything else.

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


More information about the llvm-commits mailing list