1# RUN: llc -mtriple=x86_64-- -o - %s -run-pass=none -verify-machineinstrs -simplify-mir | FileCheck %s 2--- 3# We shouldn't need any explicit successor lists in these examples 4# CHECK-LABEL: name: func0 5# CHECK: bb.0: 6# CHECK-NOT: successors 7# CHECK: JCC_1 %bb.1, 4, implicit undef $eflags 8# CHECK: JMP_1 %bb.3 9# CHECK: bb.1: 10# CHECK-NOT: successors 11# CHECK: bb.2: 12# CHECK-NOT: successors 13# CHECK: JCC_1 %bb.1, 4, implicit undef $eflags 14# CHECK: bb.3: 15# CHECK: RETQ undef $eax 16name: func0 17body: | 18 bb.0: 19 JCC_1 %bb.1, 4, implicit undef $eflags 20 JMP_1 %bb.3 21 22 bb.1: 23 24 bb.2: 25 JCC_1 %bb.1, 4, implicit undef $eflags 26 27 bb.3: 28 JCC_1 %bb.4, 4, implicit undef $eflags ; condjump+fallthrough to same block 29 30 bb.4: 31 RETQ undef $eax 32... 33--- 34# Some cases that need explicit successors: 35# CHECK-LABEL: name: func1 36name: func1 37body: | 38 bb.0: 39 ; CHECK: bb.0: 40 ; CHECK: successors: %bb.3, %bb.1 41 successors: %bb.3, %bb.1 ; different order than operands 42 JCC_1 %bb.1, 4, implicit undef $eflags 43 JMP_1 %bb.3 44 45 bb.1: 46 ; CHECK: bb.1: 47 ; CHECK: successors: %bb.2, %bb.1 48 successors: %bb.2, %bb.1 ; different order (fallthrough variant) 49 JCC_1 %bb.1, 4, implicit undef $eflags 50 51 bb.2: 52 ; CHECK: bb.2: 53 ; CHECK: successors: %bb.1(0x60000000), %bb.3(0x20000000) 54 successors: %bb.1(3), %bb.3(1) ; branch probabilities not normalized 55 JCC_1 %bb.1, 4, implicit undef $eflags 56 57 bb.3: 58 ; CHECK: bb.3: 59 ; CHECK: RETQ undef $eax 60 RETQ undef $eax 61... 62