This is a fix for:
https://llvm.org/bugs/show_bug.cgi?id=25900
If we think that an arithmetic right shift of a power of two is always a power of two, an sdiv gets wrongly converted to udiv.
I didn't see a way to simplify the test case further.
Differential D15827
[ValueTracking] fix bug computing isKnownToBeAPowerOfTwo() with arithmetic shift right (PR25900) spatel on Dec 30 2015, 11:50 AM. Authored by
Details This is a fix for: If we think that an arithmetic right shift of a power of two is always a power of two, an sdiv gets wrongly converted to udiv.
Diff Detail
Event TimelineComment Actions LGTM
|