[PATCH] D41233: [InstCombine] Canonizing 'and' before 'shl'

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 9 07:23:02 PDT 2018


spatel added a comment.

In https://reviews.llvm.org/D41233#977634, @craig.topper wrote:

> I know smaller constants is meaningful to X86. But do other targets have different immediate sizes for And instructions. ARM encodes immediates with a shift amount applied to them I think? Not sure about others.


This might be a stretch, but we could argue that smaller constants also increase the likelihood of CSE (smaller range means more potential equivalences?).

https://reviews.llvm.org/D48278 is an ARM-motivated patch that looks like it would benefit from this change.

I can't tell where we left off on this patch. Did we eliminate all of the roadblocks?


Repository:
  rL LLVM

https://reviews.llvm.org/D41233





More information about the llvm-commits mailing list