Merging r258471:
[oota-llvm.git] / test / CodeGen / AArch64 / nzcv-save.ll
1 ; RUN: llc -march=aarch64 < %s | FileCheck %s
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:
10   %c = load i256, i256* %cc
11   %d = load i256, i256* %dd
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 }