| Simon Pilgrim | fc4d4b2 | 2016-07-19 13:35:11 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -verify-machineinstrs -mtriple=aarch64-eabi | FileCheck %s |
| Tim Northover | 9a6217b | 2014-05-27 16:50:09 +0000 | [diff] [blame] | 2 | |
| 3 | ; CHECK: mrs [[NZCV_SAVE:x[0-9]+]], NZCV |
| 4 | ; CHECK: msr NZCV, [[NZCV_SAVE]] |
| 5 | |
| 6 | ; DAG ends up with two uses for the flags from an ADCS node, which means they |
| 7 | ; must be saved for later. |
| 8 | define void @f(i256* nocapture %a, i256* nocapture %b, i256* nocapture %cc, i256* nocapture %dd) nounwind uwtable noinline ssp { |
| 9 | entry: |
| David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 10 | %c = load i256, i256* %cc |
| 11 | %d = load i256, i256* %dd |
| Tim Northover | 9a6217b | 2014-05-27 16:50:09 +0000 | [diff] [blame] | 12 | %add = add nsw i256 %c, %d |
| 13 | store i256 %add, i256* %a, align 8 |
| 14 | %or = or i256 %c, 1606938044258990275541962092341162602522202993782792835301376 |
| 15 | %add6 = add nsw i256 %or, %d |
| 16 | store i256 %add6, i256* %b, align 8 |
| 17 | ret void |
| 18 | } |