[PATCH] D155478: [NewGVN] Abort PHIOfOps if singleton PHI is found
Manuel Brito via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 18 02:22:31 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG29b5666fdbef: [NewGVN] Abort PHIOfOps if singleton PHI is found (authored by ManuelJBrito).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155478/new/
https://reviews.llvm.org/D155478
Files:
llvm/lib/Transforms/Scalar/NewGVN.cpp
Index: llvm/lib/Transforms/Scalar/NewGVN.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/NewGVN.cpp
+++ llvm/lib/Transforms/Scalar/NewGVN.cpp
@@ -2749,10 +2749,10 @@
return nullptr;
}
// No point in doing this for one-operand phis.
- if (OpPHI->getNumOperands() == 1) {
- OpPHI = nullptr;
- continue;
- }
+ // Since all PHIs for operands must be in the same block, then they must
+ // have the same number of operands so we can just abort.
+ if (OpPHI->getNumOperands() == 1)
+ return nullptr;
}
if (!OpPHI)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155478.541406.patch
Type: text/x-patch
Size: 618 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230718/b9462ac0/attachment-0001.bin>
More information about the llvm-commits
mailing list