[llvm] [DAG] Use break instead of continue to leave do while (false) loop (NFC) (PR #97966)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 7 11:28:51 PDT 2024
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/97966
>From db8db6a5632c12a037bea9b7f6b82e34e23e2ddf 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 b13f6bcf3ebc1..428cdda21cd41 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