[llvm] b8d728a - [SimplifyCFG, EarlyCSE] Update 2 tests to not branch on undef (NFC).
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 12 10:06:54 PDT 2022
Author: Florian Hahn
Date: 2022-06-12T18:03:26+01:00
New Revision: b8d728a098b10f0f9afdc3fe8641b4678f57f1e6
URL: https://github.com/llvm/llvm-project/commit/b8d728a098b10f0f9afdc3fe8641b4678f57f1e6
DIFF: https://github.com/llvm/llvm-project/commit/b8d728a098b10f0f9afdc3fe8641b4678f57f1e6.diff
LOG: [SimplifyCFG,EarlyCSE] Update 2 tests to not branch on undef (NFC).
Added:
Modified:
llvm/test/Transforms/EarlyCSE/const-speculation.ll
llvm/test/Transforms/SimplifyCFG/gepcost.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/EarlyCSE/const-speculation.ll b/llvm/test/Transforms/EarlyCSE/const-speculation.ll
index 65e005de0569f..53138f5220f44 100644
--- a/llvm/test/Transforms/EarlyCSE/const-speculation.ll
+++ b/llvm/test/Transforms/EarlyCSE/const-speculation.ll
@@ -15,10 +15,10 @@
; In this case doing the speculation would create an invalid GEP(@var, 0, 1) and
; crash.
-define i1 @test_constant_speculation() {
+define i1 @test_constant_speculation(i1 %c) {
; CHECK-LABEL: @test_constant_speculation(
; CHECK-NEXT: entry:
-; CHECK-NEXT: br i1 undef, label [[END:%.*]], label [[SELECT:%.*]]
+; CHECK-NEXT: br i1 %c, label [[END:%.*]], label [[SELECT:%.*]]
; CHECK: select:
; CHECK-NEXT: br label [[END]]
; CHECK: end:
@@ -27,7 +27,7 @@ define i1 @test_constant_speculation() {
; CHECK-NEXT: ret i1 [[RES]]
;
entry:
- br i1 undef, label %end, label %select
+ br i1 %c, label %end, label %select
select:
diff --git a/llvm/test/Transforms/SimplifyCFG/gepcost.ll b/llvm/test/Transforms/SimplifyCFG/gepcost.ll
index 9d68d8992682a..cba078cba2e9e 100644
--- a/llvm/test/Transforms/SimplifyCFG/gepcost.ll
+++ b/llvm/test/Transforms/SimplifyCFG/gepcost.ll
@@ -6,10 +6,10 @@ target triple = "thumbv7m-none--eabi"
@glob = external unnamed_addr constant [16 x i8]
-define void @f() {
+define void @f(i1 %c) {
; CHECK-LABEL: @f(
; CHECK-NEXT: entr:
-; CHECK-NEXT: br i1 undef, label [[NEXT:%.*]], label [[EXIT:%.*]]
+; CHECK-NEXT: br i1 %c, label [[NEXT:%.*]], label [[EXIT:%.*]]
; CHECK: next:
; CHECK-NEXT: [[PAT:%.*]] = getelementptr [16 x i8], [16 x i8]* @glob
; CHECK-NEXT: br label [[EXIT]]
@@ -17,7 +17,7 @@ define void @f() {
; CHECK-NEXT: ret void
;
entr:
- br i1 undef, label %next, label %exit
+ br i1 %c, label %next, label %exit
next:
%pat = getelementptr [16 x i8], [16 x i8]* @glob
More information about the llvm-commits
mailing list