Most MVE instructions can be predicated to fold a select into the instruction, using the predicate and the select "else" as a passthough. This adds tablegen patterns for most two operand instructions using the newly added TwoOpPattern from D83219. It could probably be done differently, perhaps after ISel as a peephole optimisation, but doing it in tblgen gives a good excuse to clear up some of the existing patterns.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Nothing wrong with a good tablegen pattern, think I prefer that much more than a peephole!
Comment Actions
Thanks. Yeah, there will likely be another couple of patterns needed here too. They show this works quite well over a peephole I think.