[PATCH] D116935: [IRBuilder] Introduce folder using inst-simplify, use for Or fold.

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 10 10:50:54 PST 2022


craig.topper added a comment.

In D116935#3232203 <https://reviews.llvm.org/D116935#3232203>, @lebedev.ri wrote:

> In D116935#3232126 <https://reviews.llvm.org/D116935#3232126>, @craig.topper wrote:
>
>> If I remember correctly, the Or and And folds for 0 and all 1s are there to optimize bitfield codegen for the frontend. Are we losing that optimization if this patch goes in before switching clang to InstSimplifyFolder?
>
> True, but why is that optimization there in the first place?
> Presumably it shouldn't matter nowadays.

Probably for -O0 where there is no optimizer,


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116935



More information about the cfe-commits mailing list