[llvm] [llvm] Remove `br i1 undef` from regression tests (PR #115688)

Nuno Lopes via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 11 00:16:22 PST 2024


================
@@ -35,13 +38,13 @@ define void @test(i32 signext %n) {
 ;
 
 entry:
-  br i1 undef, label %if.then, label %if.end
+  br i1 %arg, label %if.then, label %if.end
 
 if.then:                                          ; preds = %entry
   ret void
 
 if.end:                                           ; preds = %entry
-  br i1 undef, label %if.then2, label %if.end4
+  br i1 %arg, label %if.then2, label %if.end4
 
 if.then2:                                         ; preds = %if.end
   unreachable
----------------
nunoplopes wrote:

the select undef below is also UB. Please replace with just switch %n

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


More information about the llvm-commits mailing list