[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
Mon Jan 4 18:19:19 PST 2021
Esme created this revision.
Esme added reviewers: steven.zhang, shchenz, PowerPC, masoud.ataei, nemanjai, jsji.
Herald added subscribers: kbarton, hiraditya.
Esme requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The patch tries to fold sqrt/sdiv test node, i.g FTSQRT, XVTDIVDP, and the branch, i.e br_cc if they satisfy these patterns:
(br_cc seteq, (and Node_test, 2), 0) -> (BCC PRED_NE, PPCNode_test)
(br_cc seteq, (and Node_test, 4), 0) -> (BCC PRED_LE, PPCNode_test)
(br_cc seteq, (and Node_test, 8), 0) -> (BCC PRED_GE, PPCNode_test)
(br_cc setne, (and Node_test, 2), 0) -> (BCC PRED_EQ, PPCNode_test)
(br_cc setne, (and Node_test, 4), 0) -> (BCC PRED_GT, PPCNode_test)
(br_cc setne, (and Node_test, 8), 0) -> (BCC PRED_LT, PPCNode_test)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D94054
Files:
llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
llvm/test/CodeGen/PowerPC/branch_test.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94054.314486.patch
Type: text/x-patch
Size: 6678 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210105/caa831f3/attachment.bin>
More information about the llvm-commits
mailing list