[PATCH] D37713: [InstSimplify] fold sdiv/srem based on compare of dividend and divisor

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 10:48:16 PDT 2017


spatel updated this revision to Diff 115073.
spatel added a comment.

Patch updated:
Handle the signed-min-value cases correctly. I've added 2 tests for those possibilities. We also managed to simplify an existing test with the extra check for the signed-min-value divisor.


https://reviews.llvm.org/D37713

Files:
  lib/Analysis/InstructionSimplify.cpp
  test/Transforms/InstCombine/div.ll
  test/Transforms/InstSimplify/exact-nsw-nuw.ll
  test/Transforms/InstSimplify/signed-div-rem.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37713.115073.patch
Type: text/x-patch
Size: 11640 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170913/3f230b71/attachment-0001.bin>


More information about the llvm-commits mailing list