[llvm] 77a06a9 - [NFC][SimplifyCFG] Autogenerate check lines in a test to declutter further update
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 15 09:05:52 PDT 2021
Author: Roman Lebedev
Date: 2021-08-15T19:02:32+03:00
New Revision: 77a06a9c33a6731fbe800ffaf8ca398bbe00dcba
URL: https://github.com/llvm/llvm-project/commit/77a06a9c33a6731fbe800ffaf8ca398bbe00dcba
DIFF: https://github.com/llvm/llvm-project/commit/77a06a9c33a6731fbe800ffaf8ca398bbe00dcba.diff
LOG: [NFC][SimplifyCFG] Autogenerate check lines in a test to declutter further update
Added:
Modified:
llvm/test/Transforms/SimplifyCFG/fold-branch-to-common-dest.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/SimplifyCFG/fold-branch-to-common-dest.ll b/llvm/test/Transforms/SimplifyCFG/fold-branch-to-common-dest.ll
index 0dae0e8fc107b..2ff0418260771 100644
--- a/llvm/test/Transforms/SimplifyCFG/fold-branch-to-common-dest.ll
+++ b/llvm/test/Transforms/SimplifyCFG/fold-branch-to-common-dest.ll
@@ -134,6 +134,7 @@ define void @one_pred_with_spec_call(i8 %v0, i8 %v1, i32* %p) {
; CHECK: final_right:
; CHECK-NEXT: call void @sideeffect0()
; CHECK-NEXT: br label [[COMMON_RET]]
+;
pred:
%c0 = icmp ne i32* %p, null
br i1 %c0, label %dispatch, label %final_right
@@ -153,10 +154,19 @@ final_right:
; Drop dereferenceable on the parameter
define void @one_pred_with_spec_call_deref(i8 %v0, i8 %v1, i32* %p) {
-; CHECK-LABEL: one_pred_with_spec_call_deref
-; CHECK-LABEL: pred:
-; CHECK: %c0 = icmp ne i32* %p, null
-; CHECK: %x = call i32 @speculate_call(i32* %p)
+; CHECK-LABEL: @one_pred_with_spec_call_deref(
+; CHECK-NEXT: pred:
+; CHECK-NEXT: [[C0:%.*]] = icmp ne i32* [[P:%.*]], null
+; CHECK-NEXT: [[X:%.*]] = call i32 @speculate_call(i32* [[P]])
+; CHECK-NEXT: [[C1:%.*]] = icmp eq i8 [[V1:%.*]], 0
+; CHECK-NEXT: [[OR_COND:%.*]] = select i1 [[C0]], i1 [[C1]], i1 false
+; CHECK-NEXT: br i1 [[OR_COND]], label [[COMMON_RET:%.*]], label [[FINAL_RIGHT:%.*]]
+; CHECK: common.ret:
+; CHECK-NEXT: ret void
+; CHECK: final_right:
+; CHECK-NEXT: call void @sideeffect0()
+; CHECK-NEXT: br label [[COMMON_RET]]
+;
pred:
%c0 = icmp ne i32* %p, null
br i1 %c0, label %dispatch, label %final_right
More information about the llvm-commits
mailing list