[PATCH] D128996: [LegalizeTypes] Replace vecreduce_xor/or/and with vecreduce_add/umax/umin if not legal

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 6 02:54:56 PDT 2022


paulwalker-arm added inline comments.


================
Comment at: llvm/test/CodeGen/AArch64/reduce-and.ll:169-171
+define <16 x i1> @test_redand_ins_v16i1(<16 x i1> %a) {
+; CHECK-LABEL: test_redand_ins_v16i1:
+; CHECK:       // %bb.0:
----------------
bsmith wrote:
> paulwalker-arm wrote:
> > Are the `_ins_` tests strictly necessary? It's not immediately obvious how they relate to your code changes.
> The rest of the tests in these files cause a `zero_extend` to be generated, hence would be covered by the current way this was being done (in an `add` dagcombine), these `_ins_` tests cause an `any_extend` to be generated, which is the reason why this functionality was moved to type legalisation, hence it seemed reasonable to test that case also (i.e. I want to avoid someone moving this back to something like an `add` dagcombine and thinking everything is fine).
Sounds reasonable. Thanks for the explanation.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128996



More information about the llvm-commits mailing list