[PATCH] D125514: [WebAssembly] Use CHECK-NEXT for irreducible-cfg.mir

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 13 00:34:28 PDT 2022


asb added a comment.

This change looks fine to me, but have you considered just moving this test over to using update_mir_test_checks.py? It's ever so slightly more verbose, but in my experience reviewing changes that change test output are so much easier as you can just see the git diff of old vs new.

Doing so would generate this CHECK block:
`
+  ; CHECK-LABEL: name: test0
+  ; CHECK: bb.0.pred0:
+  ; CHECK-NEXT:   successors: %bb.1(0x40000000), %bb.2(0x40000000)
+  ; CHECK-NEXT: {{  $}}
+  ; CHECK-NEXT:   [[CONST_I32_:%[0-9]+]]:i32 = CONST_I32 100, implicit-def $arguments
+  ; CHECK-NEXT:   BR_IF %bb.2, [[CONST_I32_]], implicit-def $arguments
+  ; CHECK-NEXT: {{  $}}
+  ; CHECK-NEXT: bb.1.pred1:
+  ; CHECK-NEXT:   successors: %bb.2(0x40000000), %bb.7(0x40000000)
+  ; CHECK-NEXT: {{  $}}
+  ; CHECK-NEXT:   BR_IF %bb.7, [[CONST_I32_]], implicit-def $arguments
+  ; CHECK-NEXT: {{  $}}
+  ; CHECK-NEXT: bb.2:
+  ; CHECK-NEXT:   successors: %bb.6(0x80000000)
+  ; CHECK-NEXT: {{  $}}
+  ; CHECK-NEXT:   [[CONST_I32_1:%[0-9]+]]:i32 = CONST_I32 0, implicit-def $arguments
+  ; CHECK-NEXT:   BR %bb.6, implicit-def $arguments
+  ; CHECK-NEXT: {{  $}}
+  ; CHECK-NEXT: bb.3.entry0:
+  ; CHECK-NEXT:   successors: %bb.4(0x80000000)
+  ; CHECK-NEXT: {{  $}}
+  ; CHECK-NEXT:   BR %bb.4, implicit-def $arguments
+  ; CHECK-NEXT: {{  $}}
+  ; CHECK-NEXT: bb.4:
+  ; CHECK-NEXT:   successors: %bb.6(0x80000000)
+  ; CHECK-NEXT: {{  $}}
+  ; CHECK-NEXT:   [[CONST_I32_2:%[0-9]+]]:i32 = CONST_I32 1, implicit-def $arguments
+  ; CHECK-NEXT:   BR %bb.6, implicit-def $arguments
+  ; CHECK-NEXT: {{  $}}
+  ; CHECK-NEXT: bb.5.entry1:
+  ; CHECK-NEXT:   successors: %bb.8(0x80000000)
+  ; CHECK-NEXT: {{  $}}
+  ; CHECK-NEXT:   BR %bb.8, implicit-def $arguments
+  ; CHECK-NEXT: {{  $}}
+  ; CHECK-NEXT: bb.6:
+  ; CHECK-NEXT:   successors: %bb.3(0x40000000), %bb.5(0x40000000)
+  ; CHECK-NEXT: {{  $}}
+  ; CHECK-NEXT:   BR_TABLE_I32 [[CONST_I32_2]], %bb.3, %bb.5, %bb.5, implicit-def $arguments
+  ; CHECK-NEXT: {{  $}}
+  ; CHECK-NEXT: bb.7:
+  ; CHECK-NEXT:   successors: %bb.6(0x80000000)
+  ; CHECK-NEXT: {{  $}}
+  ; CHECK-NEXT:   [[CONST_I32_2:%[0-9]+]]:i32 = CONST_I32 1, implicit-def $arguments
+  ; CHECK-NEXT:   BR %bb.6, implicit-def $arguments
+  ; CHECK-NEXT: {{  $}}
+  ; CHECK-NEXT: bb.8:
+  ; CHECK-NEXT:   successors: %bb.6(0x80000000)
+  ; CHECK-NEXT: {{  $}}
+  ; CHECK-NEXT:   [[CONST_I32_2:%[0-9]+]]:i32 = CONST_I32 0, implicit-def $arguments
+  ; CHECK-NEXT:   BR %bb.6, implicit-def $arguments
`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125514/new/

https://reviews.llvm.org/D125514



More information about the llvm-commits mailing list