[PATCH] D54478: [InstCombine] fold funnel shift amount based on demanded bits

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 13 09:15:28 PST 2018


spatel created this revision.
spatel added reviewers: RKSimon, craig.topper, fabiang.
Herald added a subscriber: mcrosier.

The shift amount of a funnel shift is modulo the scalar bitwidth:
http://llvm.org/docs/LangRef.html#llvm-fshl-intrinsic
...so we can use demanded bits analysis on that operand to simplify it.

This is another step towards canonicalizing {shift/shift/or} to the intrinsic in IR.


https://reviews.llvm.org/D54478

Files:
  lib/Transforms/InstCombine/InstCombineCalls.cpp
  test/Transforms/InstCombine/fsh.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54478.173862.patch
Type: text/x-patch
Size: 5107 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181113/da87a0b5/attachment.bin>


More information about the llvm-commits mailing list