From 6c8b173b4a84ad4b4b54474413b6f93f29f3d9df Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 10 Jun 2022 20:40:34 -0700 Subject: [PATCH] [SanitizerCoverage][test] Remove br i1 undef to avoid UB --- llvm/test/Instrumentation/SanitizerCoverage/crit-edge-sancov.ll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/test/Instrumentation/SanitizerCoverage/crit-edge-sancov.ll b/llvm/test/Instrumentation/SanitizerCoverage/crit-edge-sancov.ll index a752562..3f5542f 100644 --- a/llvm/test/Instrumentation/SanitizerCoverage/crit-edge-sancov.ll +++ b/llvm/test/Instrumentation/SanitizerCoverage/crit-edge-sancov.ll @@ -13,7 +13,7 @@ ; Of the below checks, we really only care that the calls to ; @__sanitizer_cov_trace_pc retain !dbg metadata. -define void @update_shadow() !dbg !3 { +define void @update_shadow(i1 %c) !dbg !3 { ; CHECK-LABEL: @update_shadow( ; CHECK-NEXT: entry: ; CHECK-NEXT: call void @__sanitizer_cov_trace_pc() #[[ATTR0:[0-9]+]], !dbg [[DBG6:![0-9]+]] @@ -25,7 +25,7 @@ define void @update_shadow() !dbg !3 { ; CHECK: [[DBG7]] = !DILocation(line: 0, scope: !3) ; CHECK: [[DBG8]] = !DILocation(line: 129, column: 2, scope: !3) entry: - br i1 undef, label %for.inc.i, label %if.end22.i + br i1 %c, label %for.inc.i, label %if.end22.i if.end22.i: ; preds = %entry br label %for.inc.i, !dbg !8 -- 2.7.4