i64 -1, whose sign bit is the 0th one, can't be left shifted without invoking UB.
Diff Detail
Diff Detail
Paths
| Differential D23362
FIx UB in APInt::ashr ClosedPublic Authored by jroelofs on Aug 10 2016, 11:08 AM.
Details
Diff Detail Event Timelinejroelofs updated this object.
This revision is now accepted and ready to land.Aug 10 2016, 12:54 PM
Revision Contents
Diff 67578 lib/Support/APInt.cpp
unittests/ADT/APIntTest.cpp
|
Isn't this SignExtend64(Val, BitWidth) ?