Chad Rosier | 31a9bbc | 2013-02-26 20:22:30 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -fast-isel -verify-machineinstrs -mtriple=x86_64-apple-darwin10 |
Chad Rosier | 7925d28 | 2013-04-02 16:31:41 +0000 | [diff] [blame] | 2 | ; RUN: llc < %s -fast-isel -verify-machineinstrs -mtriple=x86_64-pc-win32 | FileCheck %s -check-prefix=WIN32 |
| 3 | ; RUN: llc < %s -fast-isel -verify-machineinstrs -mtriple=x86_64-pc-win64 | FileCheck %s -check-prefix=WIN64 |
Chad Rosier | 31a9bbc | 2013-02-26 20:22:30 +0000 | [diff] [blame] | 4 | |
| 5 | ; Previously, this would cause an assert. |
| 6 | define i31 @t1(i31 %a, i31 %b, i31 %c) { |
| 7 | entry: |
| 8 | %add = add nsw i31 %b, %a |
| 9 | %add1 = add nsw i31 %add, %c |
| 10 | ret i31 %add1 |
| 11 | } |
Chad Rosier | 4b54f59 | 2013-03-14 21:25:04 +0000 | [diff] [blame] | 12 | |
| 13 | ; We don't handle the Windows CC, yet. |
| 14 | define i32 @foo(i32* %p) { |
| 15 | entry: |
Chad Rosier | 7925d28 | 2013-04-02 16:31:41 +0000 | [diff] [blame] | 16 | ; WIN32: foo |
| 17 | ; WIN32: movl (%rcx), %eax |
| 18 | ; WIN64: foo |
| 19 | ; WIN64: movl (%rdi), %eax |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 20 | %0 = load i32, i32* %p, align 4 |
Chad Rosier | 4b54f59 | 2013-03-14 21:25:04 +0000 | [diff] [blame] | 21 | ret i32 %0 |
| 22 | } |