mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-25 14:02:52 +02:00
975bf7a977
Summary: Without this, this command $ llvm-run llc -stop-after machine-cp -o - <( echo '' ) outputs an error, because we close stdout twice -- once when closing the file opened for "-o", and again when closing outs(). Also clarify in the outs() definition that you can't ever call it if you want to open your own raw_fd_ostream on stdout. Reviewers: jroelofs, tstellarAMD Subscribers: jholewinski, qcolombet, dsanders, llvm-commits Differential Revision: http://reviews.llvm.org/D17422 llvm-svn: 261286
38 lines
919 B
YAML
38 lines
919 B
YAML
# RUN: llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s
|
|
# This test ensures that the LLVM IR that's embedded with MIR is parsed
|
|
# correctly.
|
|
|
|
--- |
|
|
; CHECK: define i32 @foo(i32 %x, i32 %y)
|
|
; CHECK: %z = alloca i32, align 4
|
|
; CHECK: store i32 %x, i32* %z, align 4
|
|
; CHECK: br label %Test
|
|
; CHECK: Test:
|
|
; CHECK: %m = load i32, i32* %z, align 4
|
|
; CHECK: %cond = icmp eq i32 %y, %m
|
|
; CHECK: br i1 %cond, label %IfEqual, label %IfUnequal
|
|
; CHECK: IfEqual:
|
|
; CHECK: ret i32 1
|
|
; CHECK: IfUnequal:
|
|
; CHECK: ret i32 0
|
|
define i32 @foo(i32 %x, i32 %y) {
|
|
%z = alloca i32, align 4
|
|
store i32 %x, i32* %z, align 4
|
|
br label %Test
|
|
Test:
|
|
%m = load i32, i32* %z, align 4
|
|
%cond = icmp eq i32 %y, %m
|
|
br i1 %cond, label %IfEqual, label %IfUnequal
|
|
IfEqual:
|
|
ret i32 1
|
|
IfUnequal:
|
|
ret i32 0
|
|
}
|
|
|
|
...
|
|
---
|
|
name: foo
|
|
body: |
|
|
bb.0:
|
|
...
|