Dale Johannesen | 6cf64a6 | 2010-08-17 22:17:24 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -march=x86 -mtriple=i686-apple-darwin -pre-RA-sched=fast \ |
| 2 | ; RUN: | FileCheck %s |
| 3 | ; make sure scheduler honors the flags clobber. PR 7882. |
| 4 | |
| 5 | define i32 @main(i32 %argc, i8** %argv) nounwind |
| 6 | { |
| 7 | entry: |
| 8 | ; CHECK: InlineAsm End |
| 9 | ; CHECK: cmpl |
| 10 | %res = icmp slt i32 1, %argc |
| 11 | %tmp = call i32 asm sideeffect alignstack |
| 12 | "push $$0 |
| 13 | popf |
| 14 | mov $$13, $0", "=r,r,~{memory},~{flags}" (i1 %res) |
| 15 | %ret = select i1 %res, i32 %tmp, i32 42 |
| 16 | ret i32 %ret |
| 17 | } |