[llvm] b24a9f0 - [DAG] visitFREEZE - pull out Operands array. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 22 12:18:04 PDT 2022
Author: Simon Pilgrim
Date: 2022-10-22T20:14:56+01:00
New Revision: b24a9f0cef88760ae9383d445541b513bcc66018
URL: https://github.com/llvm/llvm-project/commit/b24a9f0cef88760ae9383d445541b513bcc66018
DIFF: https://github.com/llvm/llvm-project/commit/b24a9f0cef88760ae9383d445541b513bcc66018.diff
LOG: [DAG] visitFREEZE - pull out Operands array. NFCI.
Initial tidyup and it will make it easier to adjust additional Operands in a future patch.
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 33136452d4f2..38cd6b5e666a 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -14161,7 +14161,8 @@ SDValue DAGCombiner::visitFREEZE(SDNode *N) {
/*ConsiderFlags*/ false) &&
N0->getNumValues() == 1 && N0->hasOneUse()) {
SDValue MaybePoisonOperand;
- for (SDValue Op : N0->ops()) {
+ SmallVector<SDValue> Ops(N0->op_begin(), N0->op_end());
+ for (SDValue Op : Ops) {
if (DAG.isGuaranteedNotToBeUndefOrPoison(Op, /*PoisonOnly*/ false,
/*Depth*/ 1))
continue;
More information about the llvm-commits
mailing list