[PATCH] PR19958 wrong code at -O1 and above on x86_64-linux-gnu (InstCombine)

suyog suyog.sarda at samsung.com
Wed Jul 9 13:25:25 PDT 2014


Hi Duncan,

Thanks for your explanation. I have handled case for 'lshr' separately now in the patch attached.

I have combined the logic for ashr/lshr as well as exact/non-exact as most of the logic is same. 
Wherever there are special cases, i have handled them separately. I have added the logic for the  
cases which were handled by 'instsimplify' to keep the logical flow as discussed.  

I have combined the logic, since the 'match' functions are expensive, same for the log, 
and our whole point of calculating difference of log was to avoid expensive division operation.

Please help in reviewing the patch. Your comments/suggestions are most welcomed :)

http://reviews.llvm.org/D4068

Files:
  lib/Transforms/InstCombine/InstCombineCompares.cpp
  test/Transforms/InstCombine/icmp.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4068.11217.patch
Type: text/x-patch
Size: 9565 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140709/18222692/attachment.bin>


More information about the llvm-commits mailing list