[llvm] f492db7 - [SimplifyCFG] Avoid branch on undef UB in test (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 3 03:38:33 PST 2023
Author: Nikita Popov
Date: 2023-01-03T12:38:25+01:00
New Revision: f492db7eec9ce01398b46d14af463eb990980c7c
URL: https://github.com/llvm/llvm-project/commit/f492db7eec9ce01398b46d14af463eb990980c7c
DIFF: https://github.com/llvm/llvm-project/commit/f492db7eec9ce01398b46d14af463eb990980c7c.diff
LOG: [SimplifyCFG] Avoid branch on undef UB in test (NFC)
Added:
Modified:
llvm/test/Transforms/SimplifyCFG/bbi-23595.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/SimplifyCFG/bbi-23595.ll b/llvm/test/Transforms/SimplifyCFG/bbi-23595.ll
index 7dd067baac3d2..4b1147cd79b8a 100644
--- a/llvm/test/Transforms/SimplifyCFG/bbi-23595.ll
+++ b/llvm/test/Transforms/SimplifyCFG/bbi-23595.ll
@@ -11,17 +11,17 @@
; We're expecting the dbg.label associated with 'W' to disappear, because
; the 'W' label was removed.
-define i16 @_Z7test_itv() {
+define i16 @_Z7test_itv(i1 %c) {
; CHECK-LABEL: @_Z7test_itv(
; CHECK-NEXT: entry:
-; CHECK-NEXT: [[RETVAL_0:%.*]] = select i1 undef, i16 1, i16 0
+; CHECK-NEXT: [[RETVAL_0:%.*]] = select i1 [[C:%.*]], i16 1, i16 0
; CHECK-NEXT: ret i16 0
;
entry:
br label %sw.bb
sw.bb: ; preds = %entry
- br i1 undef, label %W, label %cleanup4
+ br i1 %c, label %W, label %cleanup4
W: ; preds = %sw.bb
call void @llvm.dbg.label(metadata !1), !dbg !8
More information about the llvm-commits
mailing list