Tests are added for vector reduce OR, AND and XOR.
Details
Diff Detail
Event Timeline
Thanks for adding these test. A few nits inlined, but no need for another review if you're happy to make a few changes before committing (but I can always have another look).
llvm/test/CodeGen/AArch64/reduce-or.ll | ||
---|---|---|
355 | You may want to add <2 x i32> as that is a common type and supported by the vector instructions. | |
366 | I think you can remove this one because the 32 x i8 case above is already testing a type that doesn't fit in a vector register. The same 2 comments here apply to the other files as well. | |
llvm/test/CodeGen/AArch64/reduce-xor.ll | ||
4 | Nit: test_redor_v1i1 -> test_redxor_v1i1 And a few more below. |
llvm/test/CodeGen/AArch64/reduce-and.ll | ||
---|---|---|
5 | For boolean reductions, there's already llvm/test/CodeGen/AArch64/vecreduce-bool.ll. Can those tests be unified to reduce duplication? |
llvm/test/CodeGen/AArch64/reduce-and.ll | ||
---|---|---|
5 | It seems that vecreduce-bool.ll is testing something slightly different as it is looking at the pattern of a compare with a reduction, so generates e.g. uminv and umaxv instructions. I have agreed with @SjoerdMeijer to keep these tests separate for now. |
llvm/test/CodeGen/AArch64/reduce-and.ll | ||
---|---|---|
5 | ok fair enough. |
For boolean reductions, there's already llvm/test/CodeGen/AArch64/vecreduce-bool.ll. Can those tests be unified to reduce duplication?