Juergen Ributzka | 349777d | 2014-06-12 23:27:57 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s |
Mehdi Amini | 945a660 | 2015-02-27 18:32:11 +0000 | [diff] [blame] | 2 | ; RUN: llc < %s -fast-isel -fast-isel-abort=1 -mtriple=x86_64-apple-darwin | FileCheck %s |
Juergen Ributzka | 349777d | 2014-06-12 23:27:57 +0000 | [diff] [blame] | 3 | |
| 4 | define i64 @fold_load(i64* %a, i64 %b) { |
| 5 | ; CHECK-LABEL: fold_load |
| 6 | ; CHECK: addq (%rdi), %rsi |
| 7 | ; CHECK-NEXT: movq %rsi, %rax |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 8 | %1 = load i64, i64* %a, align 8 |
Juergen Ributzka | 349777d | 2014-06-12 23:27:57 +0000 | [diff] [blame] | 9 | %2 = add i64 %1, %b |
| 10 | ret i64 %2 |
| 11 | } |
| 12 | |