[PATCH] D59867: [X86] Teach the isel optimization for (x << C1) op C2 to (x op (C2>>C1)) << C1 to consider cases where C2>>C1 can fit an unsigned 32-bit immediate

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 26 23:23:36 PDT 2019


craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel, andreadb.
Herald added a project: LLVM.

For 64-bit operations we should consider if the immediate can be made to fit
in an unsigned 32-bits immedate. For OR/XOR this allows us to load the immediate
with MOV32ri instead of movabsq. For AND this allows us to fold the immediate.


Repository:
  rL LLVM

https://reviews.llvm.org/D59867

Files:
  lib/Target/X86/X86ISelDAGToDAG.cpp
  test/CodeGen/X86/narrow-shl-cst.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59867.192411.patch
Type: text/x-patch
Size: 4504 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190327/17d80fb7/attachment.bin>


More information about the llvm-commits mailing list