[PATCH] D101191: [InstCombine] Fully disable select to and/or i1 folding
Nikita Popov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 11 09:46:53 PDT 2021
nikic added a comment.
In D101191#2751002 <https://reviews.llvm.org/D101191#2751002>, @sanwou01 wrote:
> Hi, we've got a ~6% regression in SPEC INT 2006 462.libquantum on AArch64 (both -flto and -Ofast) that comes back to this change. See here for a reproducer https://godbolt.org/z/dq98Gqqxn (-fno-vectorize is not strictly necessary, but it does make the difference easier to spot). @dmgreen mentioned to me that we could probably fix this up in the AArch64 backend, but a fix in the mid-end might be more generally useful too.
Thanks for the report! This looks like the "one hot merge" optimization, which is indeed disabled by this patch, because it is incorrect in the current form (onehot_merge.ll). We can bring back this optimization in InstCombine, but need to freeze one of the operands (c2 in your example).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101191/new/
https://reviews.llvm.org/D101191
More information about the cfe-commits
mailing list