[PATCH] PR19958 wrong code at -O1 and above on x86_64-linux-gnu (InstCombine)
suyog.sarda at samsung.com
Mon Jul 7 11:37:04 PDT 2014
Hi Duncan, Nick, Rafael, Sanjay,
I have modified the code to calculate shift by Log2(Const2) - Log2(Const1)
instead of Log2(Const2/Const1) to avoid expensive division operation as per Duncan's suggestion.
Also handled few more conditions for 0.
Added additional test cases as well.
(I am doing this for icmp eq/ne only for now,
other icmp instructions are TODO item as they need some verification)
Can you please help in reviewing this modified patch.
Your suggestions/comments are most awaited. :)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6198 bytes
Desc: not available
More information about the llvm-commits