- User Since
- Sun, Jun 6, 1:04 AM (2 w, 1 d)
Fri, Jun 18
Sun, Jun 13
Update comment for multiple use of zext test case
Use Log2_32 function instead of APInt
Sat, Jun 12
Do the opt only if the difference in bitwidth of zext src and dst is less than log2
Fri, Jun 11
Add a test with bitwidth difference of more than log2 between zext src and trunc dst
Thu, Jun 10
Removed the hard cut off check. Please review Sir.
Add a check to see that the source and dst size are same.
Sorry, to ask this here, but this is my first time here and want to ask a lame question. Who is supposed to mark the review comments as done, the developer or the reviewer (really confused in this.)
Check if size of zext src and trunc dst are same and above 5 bits
@lebedev.ri Sir, but if we don't take trunc into consideration, then how are we optimizing this?
Earlier it was 2 insts (zext - ctlz), and now its 3 insts(ctlz - add - zext). I agree that the ctlz , add are done on a lower datatype.
If we consider trunc as well, then we can convert 3 insts (zext - ctlz - trunc) to 2 insts (ctlz - add).
Shouldn't we do this opt only when the trunc is present?
@lebedev.ri In this opt: ctlz(zext(A)) --> add(ctlz(A), (bitwidth(zext(A))-bitwidth(A))
Tue, Jun 8
@spatel Addressed review comments.
Updated unit test and added condition for multiple use check for zext
Mon, Jun 7
Remove replaceAllUses manually, and let LLVM do it
@RKSimon I have addressed the review comments Sir, please have a look.
Added more tests as per review comments.
Updated the unit tests