[PATCH] D67403: [AArch64] MachineCombiner FMA matching. NFC.
Sebastian Pop via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 11 09:21:38 PDT 2019
sebpop added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:3680
+ ? true
+ : Found;
+
----------------
sebpop wrote:
> sebpop wrote:
> > ... here and below, until the end of the patch, please replace cond_exprs with bit_or exprs. Thanks!
> What about instead of the cond_expr we write it as in the original code with if_stmts?
> ```
> if (Match(1))
> Found = true;
> else if (Match(2))
> Found = true;
> ```
> I find this form more readable than the cond_expr.
Or you could do
```
Found |=
Match(AArch64::FMULSrr, 1, MCP::FMULADDS_OP1) ||
Match(AArch64::FMULv1i32_indexed, 1, MCP::FMLAv1i32_indexed_OP1);
```
as the `||` will only evaluate the first operand when it results in `true` and avoid evaluating the second operand.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67403/new/
https://reviews.llvm.org/D67403
More information about the llvm-commits
mailing list