[PATCH] PR19958 wrong code at -O1 and above on x86_64-linux-gnu (InstCombine)
suyog
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. :)
Thanks,
Suyog
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.11125.patch
Type: text/x-patch
Size: 6198 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140707/8e29ffe0/attachment.bin>
More information about the llvm-commits
mailing list