[llvm] c80cabf - [SCCP] Avoid use of undef value in test (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 3 05:25:15 PDT 2024
Author: Nikita Popov
Date: 2024-09-03T14:25:07+02:00
New Revision: c80cabfcbe88d2f67372bba982eadf45330a5e1b
URL: https://github.com/llvm/llvm-project/commit/c80cabfcbe88d2f67372bba982eadf45330a5e1b
DIFF: https://github.com/llvm/llvm-project/commit/c80cabfcbe88d2f67372bba982eadf45330a5e1b.diff
LOG: [SCCP] Avoid use of undef value in test (NFC)
Avoid optimization away most of the code if we resolve this to
a specific value.
Added:
Modified:
llvm/test/Transforms/SCCP/widening.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/SCCP/widening.ll b/llvm/test/Transforms/SCCP/widening.ll
index 473594eb988da3..144c3fd54e75b6 100644
--- a/llvm/test/Transforms/SCCP/widening.ll
+++ b/llvm/test/Transforms/SCCP/widening.ll
@@ -432,10 +432,10 @@ exit:
; In the function below, the condition %c.1 results in a range [7, 6), which
; can be used as a widening bound. It does not fully contain the range we get
; from combining it with the information from %tmp12.
-define void @foo(ptr %arg) {
+define void @foo(ptr %arg, i8 %x) {
; SCCP-LABEL: @foo(
; SCCP-NEXT: bb:
-; SCCP-NEXT: [[TMP:%.*]] = zext i8 undef to i32
+; SCCP-NEXT: [[TMP:%.*]] = zext i8 [[X:%.*]] to i32
; SCCP-NEXT: [[TMP2:%.*]] = load i64, ptr [[ARG:%.*]], align 8
; SCCP-NEXT: switch i32 [[TMP]], label [[BB20:%.*]] [
; SCCP-NEXT: i32 1, label [[BB3:%.*]]
@@ -472,7 +472,7 @@ define void @foo(ptr %arg) {
;
; IPSCCP-LABEL: @foo(
; IPSCCP-NEXT: bb:
-; IPSCCP-NEXT: [[TMP:%.*]] = zext i8 undef to i32
+; IPSCCP-NEXT: [[TMP:%.*]] = zext i8 [[X:%.*]] to i32
; IPSCCP-NEXT: [[TMP2:%.*]] = load i64, ptr [[ARG:%.*]], align 8
; IPSCCP-NEXT: switch i32 [[TMP]], label [[BB20:%.*]] [
; IPSCCP-NEXT: i32 1, label [[BB3:%.*]]
@@ -508,7 +508,7 @@ define void @foo(ptr %arg) {
; IPSCCP-NEXT: ret void
;
bb:
- %tmp = zext i8 undef to i32
+ %tmp = zext i8 %x to i32
%tmp2 = load i64, ptr %arg, align 8
switch i32 %tmp, label %bb20 [
i32 1, label %bb3
More information about the llvm-commits
mailing list