[PATCH] Added InstCombine transformation for combining two instructions icmp ult/ule/uge/ugt (ashr/lshr (Const2) %A), (Const1)

Ankur Garg ankur29.garg at samsung.com
Mon Nov 10 05:48:00 PST 2014


Hi silvas,
I checked the optimization using ALIVe. I found out a couple of cases, which although never reached this code, were being handled wrong. I have made the appropriate changes to exclude those cases from being handled here as they are already being handled in InstSimplify.

Since there are 4 number of operators (uge/ugt/ule/ult) and two right shifts (ashr/lshr), the total number of cases are really huge. This makes the output of alive really large. (Total 56 separate cases). Should I paste it here ?

http://reviews.llvm.org/D5518

Files:
  lib/Transforms/InstCombine/InstCombine.h
  lib/Transforms/InstCombine/InstCombineCompares.cpp
  test/Transforms/InstCombine/icmp-shr.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5518.15974.patch
Type: text/x-patch
Size: 12967 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141110/2139326c/attachment.bin>


More information about the llvm-commits mailing list