[PATCH] D127275: [MVE] Fold fadd(select(..., +0.0)) into a predicated fadd
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 10 01:14:46 PDT 2022
dmgreen accepted this revision.
dmgreen added a comment.
This revision is now accepted and ready to land.
Thanks for putting this patch together. That's a great help and the regressions were pretty large otherwise! I am still getting some odd results from the change, but I think that is just folding the select 0 into a masked load, which is OK.
Other than using FaddFlags instead of SelFlags, this LGTM.
================
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);
}
----------------
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
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127275/new/
https://reviews.llvm.org/D127275
More information about the llvm-commits
mailing list