[PATCH] D91343: [InstCombine] Optimize away the unnecessary multi-use sign-extend

Bhramar Vatsa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 12 06:06:52 PST 2020


Bhramar.vatsa created this revision.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
Bhramar.vatsa requested review of this revision.

C.f. https://bugs.llvm.org/show_bug.cgi?id=47765

Added a case for handling the sign-extend (Shl+AShr) for multiple uses, to optimize it away for an individual use, when the demanded bits aren't affected by sign-extend.


https://reviews.llvm.org/D91343

Files:
  llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
  llvm/test/Transforms/InstCombine/simplify-multiuse-demanded-bits-ashr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91343.304805.patch
Type: text/x-patch
Size: 9320 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201112/f222baa6/attachment.bin>


More information about the llvm-commits mailing list