[PATCH] D94054: [PowerPC] Try to fold sqrt/sdiv test results with the branch.
EsmeYi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 5 02:25:28 PST 2021
Esme added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:4384
+static unsigned getTestSqrtOpcode(SDValue N) {
+ if (N.getOpcode() == PPCISD::FTSQRT) {
----------------
steven.zhang wrote:
> Do you have any problems to implement this folding with .td ? It doesn't make sense to me to get the opcode and then do the folding, as that is done during instr match(.td).
These pattens have to be matched before the selection of the single br_cc, which is implemented in PPCISelDAGToDAG.cpp, therefore these folding can't be implemented with .td. You're right, that it'll be better to leave the selection of intrinsics to td.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94054/new/
https://reviews.llvm.org/D94054
More information about the llvm-commits
mailing list