[PATCH] D147243: [X86] MatchVectorAllZeroTest - add support for icmp(bitcast(icmp_ne(X,Y)),0) vector reduction patterns
Alexander Kornienko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 6 02:27:04 PDT 2023
alexfh added a comment.
In D147243#4248129 <https://reviews.llvm.org/D147243#4248129>, @RKSimon wrote:
> I should have the fix done shortly - please don't start reverting anything....
Glad to hear that! In case you wonder, there's a C++ test case as well:
$ cat q.ii
struct V {
unsigned : 28;
unsigned p_ : 4;
unsigned : 32;
unsigned : 32;
unsigned : 56;
unsigned q_ : 4;
unsigned : 2;
unsigned r_ : 1;
unsigned : 1;
unsigned s : 27;
unsigned t : 1;
unsigned : 4;
unsigned : 1;
unsigned : 75;
unsigned p() { return p_; }
unsigned q() { return q_; }
unsigned r() { return r_; }
};
bool x(V a, V b) {
return a.p() != b.p() || a.s || a.q() != b.q() || a.r() != b.r() || a.t;
}
$ ./clang -O2 --target=x86_64-unknown-linux-gnu -fsanitize=address -c q.ii -o bad.o
Stack dump:
0. Program arguments: ./clang -O2 --target=x86_64-unknown-linux-gnu -fsanitize=address -c q.ii -o bad.o
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'q.ii'.
4. Running pass 'X86 DAG->DAG Instruction Selection' on function '@_Z1x1VS_'
...
And here: https://gcc.godbolt.org/z/P51G8xrxG
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147243/new/
https://reviews.llvm.org/D147243
More information about the llvm-commits
mailing list