[PATCH] D89956: [AArch64] Redundant masks in downcast long multiply
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 22 07:20:08 PDT 2020
dmgreen added a comment.
Looks nice to me. Is it worth adding mul (sext_inreg, sext i32) patterns too in case one operand is sext and the other is being masked? mul is commutative so I think it would only be two extra patterns, one for sext and one for zext.
================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.td:1477
+def : Pat<(mul (sext_inreg GPR64:$Rn, i32), (sext_inreg GPR64:$Rm, i32)),
+ (SMADDLrrr (EXTRACT_SUBREG $Rn, sub_32), (EXTRACT_SUBREG $Rm, sub_32), XZR)>;
+def : Pat<(mul (and GPR64:$Rn, 0xFFFFFFFF), (and GPR64:$Rm, 0xFFFFFFFF)),
----------------
Nit: Can you line up the ('s for the input and the output
The other patterns below have output type's too. It's probably worth adding those just for consistency.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89956/new/
https://reviews.llvm.org/D89956
More information about the llvm-commits
mailing list