[llvm] [llvm] Remove `br i1 undef` from regression tests (PR #118419)
Nuno Lopes via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 3 00:27:52 PST 2024
================
@@ -1,14 +1,13 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -passes=sccp -S | FileCheck %s
-; Branch on undef is UB, so the T block is never executed, and we can return
-; undef (IPSCCP would replace the block with unreachable).
-
-define i32 @foo() {
+define i32 @foo(i1 %arg) {
; CHECK-LABEL: @foo(
-; CHECK-NEXT: unreachable
+; CHECK-NEXT: br i1 [[ARG:%.*]], label [[T:%.*]], label [[T]]
+; CHECK: T:
+; CHECK-NEXT: ret i32 1
;
- br i1 undef, label %T, label %T
+ br i1 %arg, label %T, label %T
----------------
nunoplopes wrote:
leave this one as poison to retain the spirit of the test
https://github.com/llvm/llvm-project/pull/118419
More information about the llvm-commits
mailing list