Given a zero input for a udot, an add can be folded in to take the place of the input.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AArch64/AArch64InstrFormats.td | ||
---|---|---|
5626 ↗ | (On Diff #325419) | As you know I don't mind nice and concise little patterns, but was wondering if we don't expect this simplification to happen earlier? |
llvm/lib/Target/AArch64/AArch64InstrFormats.td | ||
---|---|---|
5626 ↗ | (On Diff #325419) | Not sure what the exact policy is, but InstCombinerImpl::visitCallInst( does optimize some target specific intrinsics. But I think this would be good to have for instruction selection in any case |
llvm/lib/Target/AArch64/AArch64InstrFormats.td | ||
---|---|---|
5626 ↗ | (On Diff #325419) | Oh, you mean pre-ISel? We lower a vecreduce.add(v16i8 x) to a vecreduce(udot(zero, one, x)), so this needs to be done sometime during ISel lowering at least. I'll add some tests for it. I can make it into a DAG combine. That should capture more cases without extra patterns, and should be simple enough I think. |