[PATCH] D110170: [InstCombine] fold cast of right-shift if high bits are not demanded

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 6 10:24:57 PDT 2021


spatel added a comment.

In D110170#3044059 <https://reviews.llvm.org/D110170#3044059>, @bjope wrote:

> Although. the original IR looked a bit more like in this example https://godbolt.org/z/s8Krzrq36 , which show that the number of instructions in the loop increase from 16 to 19, for x86, when using opt from trunc instead of the 13.0.0 version. And afaict this patch is the main difference.

I agree with your analysis, and I don't mean to dismiss the regression, but we might be able to optimize the larger example even better (either because of or in spite of this patch!).

I filed these bugs:
https://llvm.org/PR52092
https://llvm.org/PR52093
https://llvm.org/PR52094


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110170/new/

https://reviews.llvm.org/D110170



More information about the llvm-commits mailing list