[PATCH] D136432: [AMDGPU] Combine BFI instructions.
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 25 03:08:19 PDT 2022
foad added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp:2194
+ SDNode *CurrentOr = N;
+ while (CurrentOr && CurrentOr->hasOneUse()) {
+ SDValue O0 = CurrentOr->getOperand(0);
----------------
tsymalla wrote:
> foad wrote:
> > The top level OR can have multiple uses.
> Yes. You are right. Thanks.
This is not the right place to put the hasOneUse check anyway. What would happen if the check failed? You would break out of the loop, and then generate wrong code.
Also how can the check for `CurrentOr` ever fail?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136432/new/
https://reviews.llvm.org/D136432
More information about the llvm-commits
mailing list