From 55f95127bf55ae4544d58c7087dbe87ef3cbbf7f 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. llvm-svn: 243123 --- .../CodeGen/MIR/X86/successor-basic-blocks.mir | 80 ++++++++++++++++++++++ llvm/test/CodeGen/MIR/successor-basic-blocks.mir | 58 ---------------- 2 files changed, 80 insertions(+), 58 deletions(-) create mode 100644 llvm/test/CodeGen/MIR/X86/successor-basic-blocks.mir delete mode 100644 llvm/test/CodeGen/MIR/successor-basic-blocks.mir diff --git a/llvm/test/CodeGen/MIR/X86/successor-basic-blocks.mir b/llvm/test/CodeGen/MIR/X86/successor-basic-blocks.mir new file mode 100644 index 0000000..de4f84e --- /dev/null +++ b/llvm/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 + + ;