[PATCH] D124119: [InstCombine] Combine instructions of type or/and where AND masks can be combined.
Alexander Kornienko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 1 03:08:59 PDT 2022
alexfh added a comment.
I was wrong with the initial analysis. The patch doesn't just make the performance worse. It makes clang loop indefinitely on a certain input.
$ cat q.cc
int e;
int u;
int ag;
void f() {
int ak = e;
int al((unsigned char)(ak >> 23) & 925);
if (ak)
al = (ak >> 23 & u) | ((unsigned char)(ak >> 23) & 925) | (u >> 23 & 157);
ag = al;
}
$ time ./clang-15-10515 --target=x86_64--linux-gnu -O1 -c q.cc
^C
real 0m45.072s
user 0m0.025s
sys 0m0.099s
This is definitely a problem that has to be fixed. If you don't have an obvious fix in mind, please revert while investigating.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124119/new/
https://reviews.llvm.org/D124119
More information about the llvm-commits
mailing list