Displaying 1 result from an estimated 1 matches for "newcst".
2015 Apr 06
2
[LLVMdev] inconsistent wording in the LangRef regarding "shl nsw"
...n overflow (by the usual definition of sign-overflow), so
this violates (2).
InstCombine already has a check for this edge-case when folding
multiplies into left shifts:
...
if (I.hasNoUnsignedWrap())
Shl->setHasNoUnsignedWrap();
if (I.hasNoSignedWrap() && *** NewCst->isNotMinSignedValue() ***)
Shl->setHasNoSignedWrap();
...
(though the check is a bit weird -- NewCst is Log2(IVal) so I think it
cannot ever be INT_MIN, and I suspect that the check is supposed to be
"IVal->isNotMinSignedValue()" or equivalent.)
Should one of the two...