This patch uses KnownOnes of the input of ctlz/cttz to bound the value that can be returned from these intrinsics. This makes these intrinsics more similar to the handling for ctpop which already uses known bits to produce a similar bound.
Details
Details
Diff Detail
Diff Detail
Event Timeline
test/Transforms/InstCombine/intrinsics.ll | ||
---|---|---|
304–312 | Can you add a negative test for each of ctlz/cttz? |
Can you add a negative test for each of ctlz/cttz?
That would be "icmp eq i8 %cnt, 2" for this case if I'm reading it correctly.