[PATCH] D52508: [InstCombine] Clean up after IndVarSimplify

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 11 11:32:18 PDT 2018


dmgreen updated this revision to Diff 169260.
dmgreen added a comment.

Whilst we're here, can anyone think of a good way to simplify:
(S + -32) - (-32 & (S + umax(31 - S, -32)))
That's the "do" case. I think if we distribute the -32& through the add, that with the rest of instcombine + cse + instcombine again does get us down to:
S & 31


https://reviews.llvm.org/D52508

Files:
  lib/Transforms/InstCombine/InstCombineAddSub.cpp
  test/Transforms/IndVarSimplify/replace-loop-exit-folds.ll
  test/Transforms/InstCombine/add-select.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52508.169260.patch
Type: text/x-patch
Size: 8611 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181011/f83b5d4c/attachment.bin>


More information about the llvm-commits mailing list