diff options
author | Bob Wilson <bob.wilson@apple.com> | 2012-05-30 00:17:12 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2012-05-30 00:17:12 +0000 |
commit | 6e1b8128505711276a87e96f6bffb818b435cbd5 (patch) | |
tree | 6de88116fe82f5718ead015ceb088c9e7515dc08 /test/CodeGen/Generic | |
parent | 209cdc2999208e9783349e970bd96fc37557fd97 (diff) | |
download | llvm-6e1b8128505711276a87e96f6bffb818b435cbd5.tar.gz llvm-6e1b8128505711276a87e96f6bffb818b435cbd5.tar.bz2 llvm-6e1b8128505711276a87e96f6bffb818b435cbd5.tar.xz |
Add an insertPass API to TargetPassConfig. <rdar://problem/11498613>
Besides adding the new insertPass function, this patch uses it to
enhance the existing -print-machineinstrs so that the MachineInstrs
after a specific pass can be printed.
Patch by Bin Zeng!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157655 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Generic')
-rw-r--r-- | test/CodeGen/Generic/print-machineinstrs.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/Generic/print-machineinstrs.ll b/test/CodeGen/Generic/print-machineinstrs.ll new file mode 100644 index 0000000000..75b4cd14ff --- /dev/null +++ b/test/CodeGen/Generic/print-machineinstrs.ll @@ -0,0 +1,14 @@ +; RUN: llc < %s -O3 -debug-pass=Structure -print-machineinstrs=branch-folder -o /dev/null |& FileCheck %s +; RUN: llc < %s -O3 -debug-pass=Structure -print-machineinstrs -o /dev/null |& FileCheck %s +; RUN: llc < %s -O3 -debug-pass=Structure -print-machineinstrs= -o /dev/null |& FileCheck %s + +define i64 @foo(i64 %a, i64 %b) nounwind { +; CHECK: -branch-folder -print-machineinstrs +; CHECK: Control Flow Optimizer +; CHECK-NEXT: MachineFunction Printer +; CHECK: Machine code for function foo: + %c = add i64 %a, %b + %d = trunc i64 %c to i32 + %e = zext i32 %d to i64 + ret i64 %e +} |