From 9b1988a8401ab178ed073ea3f152b286f822b5e5 Mon Sep 17 00:00:00 2001 From: Alex Lorenz Date: Fri, 24 Jul 2015 17:31:55 +0000 Subject: [PATCH] MIR Tests: Make the basic block successor test an X86 specific test. This commit moves and transforms the generic test 'CodeGen/MIR/successor-basic-blocks.mir' into an X86 specific test 'CodeGen/MIR/X86/successor-basic-blocks.mir'. This change is required in order to enable the machine verifier for the MIR parser, as the machine verifier verifies that the machine basic blocks contain instructions that actually determine the machine basic block successors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243123 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../MIR/X86/successor-basic-blocks.mir | 80 +++++++++++++++++++ test/CodeGen/MIR/successor-basic-blocks.mir | 58 -------------- 2 files changed, 80 insertions(+), 58 deletions(-) create mode 100644 test/CodeGen/MIR/X86/successor-basic-blocks.mir delete mode 100644 test/CodeGen/MIR/successor-basic-blocks.mir diff --git a/test/CodeGen/MIR/X86/successor-basic-blocks.mir b/test/CodeGen/MIR/X86/successor-basic-blocks.mir new file mode 100644 index 00000000000..de4f84eb210 --- /dev/null +++ b/test/CodeGen/MIR/X86/successor-basic-blocks.mir @@ -0,0 +1,80 @@ +# RUN: llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -o /dev/null %s | FileCheck %s +# This test ensures that the MIR parser parses basic block successors correctly. + +--- | + + define i32 @foo(i32 %a) { + entry: + %0 = icmp sle i32 %a, 10 + br i1 %0, label %less, label %exit + + less: + ret i32 0 + + exit: + ret i32 %a + } + + define i32 @bar(i32 %a) { + entry: + %b = icmp sle i32 %a, 10 + br i1 %b, label %0, label %1 + + ;