[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
Wed Jun 8 05:41:44 PDT 2022


david-arm added inline comments.


================
Comment at: llvm/test/CodeGen/Thumb2/mve-pred-selectop3.ll:375
+  %c = call <4 x i1> @llvm.arm.mve.vctp32(i32 %n)
+  %a = select <4 x i1> %c, <4 x float> %y, <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>
+  %b = fadd <4 x float> %a, %x
----------------
dmgreen wrote:
> Can you add nsz variants of the tests and make sure it is only those that get folded.
I was a bit confused by your comment starting `Yes, but I'm not sure how that matters. ` Do you agree with @spatel that we should only apply the fold for '+0.0' if the nsz flag is set on the select? Hopefully the FMF flags on the IR select have been propagated to the VSELECT DAG node.


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