[llvm] [SimplifyCFG] Update profile metadata regardless of weight count (PR #190982)

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 8 07:50:10 PDT 2026


================
@@ -3699,7 +3699,7 @@ class SwitchInstProfUpdateWrapper {
   SwitchInstProfUpdateWrapper(SwitchInst &SI) : SI(SI) { init(); }
 
   ~SwitchInstProfUpdateWrapper() {
-    if (Changed && Weights.has_value() && Weights->size() >= 2)
+    if (Changed && Weights.has_value())
----------------
mtrofin wrote:

I don't get it. When would Weights->size() < 2 make sense?

https://github.com/llvm/llvm-project/pull/190982


More information about the llvm-commits mailing list