[llvm] [DAG] Use break instead of continue to leave do while (false) loop (PR #97966)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 7 11:23:39 PDT 2024
https://github.com/AtariDreams created https://github.com/llvm/llvm-project/pull/97966
None
>From d5cedf5d5e84e9f147a15c3fb0b77c40b19f18f3 Mon Sep 17 00:00:00 2001
From: Rose <gfunni234 at gmail.com>
Date: Sun, 7 Jul 2024 14:23:20 -0400
Subject: [PATCH] [DAG] Use break instead of continue to leave do while (false)
loop
---
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index b13f6bcf3ebc1a..428cdda21cd41d 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -18982,19 +18982,19 @@ SDValue DAGCombiner::ForwardStoreValueToDirectLoad(LoadSDNode *LD) {
// Truncate Value To Stored Memory Size.
do {
if (!getTruncatedStoreValue(ST, Val))
- continue;
+ break;
if (!isTypeLegal(LDMemType))
- continue;
+ break;
if (STMemType != LDMemType) {
// TODO: Support vectors? This requires extract_subvector/bitcast.
if (!STMemType.isVector() && !LDMemType.isVector() &&
STMemType.isInteger() && LDMemType.isInteger())
Val = DAG.getNode(ISD::TRUNCATE, SDLoc(LD), LDMemType, Val);
else
- continue;
+ break;
}
if (!extendLoadedValueToExtension(LD, Val))
- continue;
+ break;
return ReplaceLd(LD, Val, Chain);
} while (false);
More information about the llvm-commits
mailing list