[PATCH] PR19958 wrong code at -O1 and above on x86_64-linux-gnu (InstCombine)
sardask01 at gmail.com
Fri Jul 11 13:37:39 PDT 2014
On Sat, Jul 12, 2014 at 1:54 AM, suyog <suyog.sarda at samsung.com> wrote:
> Hi Duncan,
> Thanks for your review.
> Couldn't spot the miscompiles earlier because i didn't comment out
> the 'simplify' call. Now i modified the code and tested almost every
> I have modified the code as per your suggestions :
> - Made comments short and crisp as per your suggestion.
> - included lambda helper functions to return appropriate constant
> and icmp instruction.
> - included logic for both constants -1 for ashr as suggested
> (In my opinion if both constants are equal and not -1,
> then final icmp would be icmp eq/ne A, 0. The Predicate won't
> get inversed and will remain same. You had suggested using lambda
> function here to get inversed predicate. Correct me if my analysis is
> - used 'bool IsAShr' to avoid recalculation.
> - removed LShrOperator block which was causing miscompiles.
> - removed unnecessary shl/lshr distinction for exact and non exact
> - moved all test cases to new file icmp-ashr.ll
> - used msb_high/low instead of +ve/-ve and opposite msb
> - tried including all combinations of ne/eq + exact/non-exact + lshr/ashr
> Please help in reviewing the patch.
> Your comments/suggestions are valuable and most awaited. :)
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits