[PATCH] D155169: [CSKY] Add more patterns to select FNMUL

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 28 07:02:34 PDT 2023


benshi001 marked an inline comment as done.
benshi001 added inline comments.


================
Comment at: llvm/lib/Target/CSKY/CSKYInstrInfoF1.td:146
+let Predicates = [HasFPUv2_SF] in {
+  def : Pat<(f32 (fmul (fneg sFPR32Op:$vrx), sFPR32Op:$vry)),
+            (FNMUL_S sFPR32Op:$vrx, sFPR32Op:$vry)>;
----------------
zixuan-wu wrote:
> `(f32 (fmul sFPR32Op:$vrx (fneg sFPR32Op:$vry)))` is also possible?
We need not specify it explictly, since `fmul` is commutable operation. I have added tests for both cases.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155169/new/

https://reviews.llvm.org/D155169



More information about the llvm-commits mailing list