[PATCH] D127275: [MVE] Fold fadd(select(..., +0.0)) into a predicated fadd

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 10 03:11:42 PDT 2022


david-arm marked an inline comment as done.
david-arm added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:16739
+      DAG.getNode(ISD::FADD, DL, VT, Op0, Op1.getOperand(1), FaddFlags);
+  return DAG.getNode(ISD::VSELECT, DL, VT, Op1.getOperand(0), FAdd, Op0, SelFlags);
 }
----------------
dmgreen wrote:
> I don't think it is valid to transfer the flags to the select, unfortunately. nsz may be valid, but not the existing flags.
> https://alive2.llvm.org/ce/z/9u943A
> 
> It should be valid to transfer the flags from the fadd, as that is the end result of the old pattern. https://alive2.llvm.org/ce/z/PzGZSw
Thanks for the LGTM @dmgreen! I addressed this comment before merging.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127275



More information about the llvm-commits mailing list