[llvm-commits] [llvm] r60366 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Duncan Sands
baldrick at free.fr
Tue Dec 2 00:24:15 PST 2008
Hi Bill,
> Use a simple comparison. Overflow on integer negation can only occur when the
> integer is "minint".
to check whether X is "minint", regardless of whether X is constant or not, you
can call ComputeMaskedBits. If any bit (except for the sign bit) is known to be 1,
then X is not equal to minint. If the sign bit is known to be 0, then also X is
not equal to minint.
Ciao,
Duncan.
More information about the llvm-commits
mailing list