[llvm] 46d5615 - [SimpleLoopUnswitch] Regenerate test checks (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 18 02:41:14 PDT 2022
Author: Nikita Popov
Date: 2022-07-18T11:41:08+02:00
New Revision: 46d5615742eed35efa19f55c84b43afd4575d522
URL: https://github.com/llvm/llvm-project/commit/46d5615742eed35efa19f55c84b43afd4575d522
DIFF: https://github.com/llvm/llvm-project/commit/46d5615742eed35efa19f55c84b43afd4575d522.diff
LOG: [SimpleLoopUnswitch] Regenerate test checks (NFC)
Added:
llvm/test/Transforms/SimpleLoopUnswitch/callbr.ll
Modified:
Removed:
llvm/test/Transforms/SimpleLoopUnswitch/not-safe-to-clone.ll
################################################################################
diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/callbr.ll b/llvm/test/Transforms/SimpleLoopUnswitch/callbr.ll
new file mode 100644
index 0000000000000..baba8eded741b
--- /dev/null
+++ b/llvm/test/Transforms/SimpleLoopUnswitch/callbr.ll
@@ -0,0 +1,45 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -passes='simple-loop-unswitch<nontrivial>' %s -S | FileCheck %s
+
+declare i1 @foo()
+
+define i32 @mem_cgroup_node_nr_lru_pages(i1 %tree) {
+; CHECK-LABEL: @mem_cgroup_node_nr_lru_pages(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: br label [[FOR_COND:%.*]]
+; CHECK: for.cond:
+; CHECK-NEXT: br i1 [[TREE:%.*]], label [[IF_END8:%.*]], label [[IF_ELSE:%.*]]
+; CHECK: if.else:
+; CHECK-NEXT: callbr void asm sideeffect ".pushsection __jump_table, \22aw\22 \0A\09.popsection \0A\09", "!i,~{dirflag},~{fpsr},~{flags}"()
+; CHECK-NEXT: to label [[IF_END8]] [label %for.cond5.preheader]
+; CHECK: for.cond5.preheader:
+; CHECK-NEXT: br label [[FOR_COND5:%.*]]
+; CHECK: for.cond5:
+; CHECK-NEXT: [[CALL6:%.*]] = call i1 @foo()
+; CHECK-NEXT: br i1 [[CALL6]], label [[IF_END8_LOOPEXIT:%.*]], label [[FOR_COND5]]
+; CHECK: if.end8.loopexit:
+; CHECK-NEXT: br label [[IF_END8]]
+; CHECK: if.end8:
+; CHECK-NEXT: br label [[FOR_COND]]
+;
+entry:
+ br label %for.cond
+
+for.cond: ; preds = %if.end8, %entry
+ br i1 %tree, label %if.end8, label %if.else
+
+if.else: ; preds = %for.cond
+ callbr void asm sideeffect ".pushsection __jump_table, \22aw\22 \0A\09.popsection \0A\09", "!i,~{dirflag},~{fpsr},~{flags}"()
+ to label %if.end8 [label %for.cond5]
+
+for.cond5: ; preds = %if.else, %for.cond5
+ %call6 = call i1 @foo()
+ br i1 %call6, label %if.end8.loopexit, label %for.cond5
+
+if.end8.loopexit: ; preds = %for.cond5
+ br label %if.end8
+
+if.end8: ; preds = %if.end8.loopexit, %if.else, %for.cond
+ br label %for.cond
+}
+
diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/not-safe-to-clone.ll b/llvm/test/Transforms/SimpleLoopUnswitch/not-safe-to-clone.ll
deleted file mode 100644
index e22d467b7deee..0000000000000
--- a/llvm/test/Transforms/SimpleLoopUnswitch/not-safe-to-clone.ll
+++ /dev/null
@@ -1,27 +0,0 @@
-; RUN: opt -passes='simple-loop-unswitch<nontrivial>' %s -S | FileCheck %s
-
-declare i1 @foo()
-
-; CHECK: define {{.*}} @mem_cgroup_node_nr_lru_pages
-define i32 @mem_cgroup_node_nr_lru_pages(i1 %tree) {
-entry:
- br label %for.cond
-
-for.cond: ; preds = %if.end8, %entry
- br i1 %tree, label %if.end8, label %if.else
-
-if.else: ; preds = %for.cond
- callbr void asm sideeffect ".pushsection __jump_table, \22aw\22 \0A\09.popsection \0A\09", "!i,~{dirflag},~{fpsr},~{flags}"()
- to label %if.end8 [label %for.cond5]
-
-for.cond5: ; preds = %if.else, %for.cond5
- %call6 = call i1 @foo()
- br i1 %call6, label %if.end8.loopexit, label %for.cond5
-
-if.end8.loopexit: ; preds = %for.cond5
- br label %if.end8
-
-if.end8: ; preds = %if.end8.loopexit, %if.else, %for.cond
- br label %for.cond
-}
-
More information about the llvm-commits
mailing list