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) Authored by spatel on Dec 30 2015, 11:50 AM. 
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 
 
 | ||||||||||||
I wouldn't worry about this case here. I think canonicalization should be responsible for making sure that an arithmetic shift right can be turned into a logical shift right.