For bitfield insert OR matching, check both operands for larger pattern
first before checking for smaller pattern.
Add pattern for unsigned bitfield insert-in-zero done with SHL+AND.
Resolves PR21631.
Paths
| Differential D12908
[AArch64] Improved bitfield instruction selection. ClosedPublic Authored by gberry on Sep 16 2015, 10:39 AM.
Details Summary For bitfield insert OR matching, check both operands for larger pattern Add pattern for unsigned bitfield insert-in-zero done with SHL+AND. Resolves PR21631.
Diff Detail Event Timelinegberry updated this object. jmolloy edited edge metadata. Comment ActionsHi Geoff, Thanks for working on this. I have some comments below. Cheers, James
This revision now requires changes to proceed.Sep 17 2015, 1:24 AM Comment Actions James, thanks for the comments. I've added a new revision which should hopefully address all of them. This revision is now accepted and ready to land.Sep 18 2015, 8:48 AM Closed by commit rL248006: [AArch64] Improved bitfield instruction selection. (authored by gberry). · Explain WhySep 18 2015, 10:13 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 35020 lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
test/CodeGen/AArch64/bitfield-insert.ll
test/CodeGen/AArch64/xbfiz.ll
|
This is called from 3 places after your patch. 2 of them explicitly set BiggerPattern.
It would make sense to remove the default from this parameter and just set it in the last callsite. This would also allow you to put the output MaskWidth at the end of the argument list.