1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64 -mattr=+v8.5a,+rand %s -o - | FileCheck %s
4 define i32 @rndr(i64* %__addr) {
7 ; CHECK-NEXT: mrs x9, RNDR
8 ; CHECK-NEXT: cset w8, eq
9 ; CHECK-NEXT: and w8, w8, #0x1
10 ; CHECK-NEXT: str x9, [x0]
11 ; CHECK-NEXT: mov w0, w8
13 %1 = tail call { i64, i1 } @llvm.aarch64.rndr()
14 %2 = extractvalue { i64, i1 } %1, 0
15 %3 = extractvalue { i64, i1 } %1, 1
16 store i64 %2, i64* %__addr, align 8
17 %4 = zext i1 %3 to i32
22 define i32 @rndrrs(i64* %__addr) {
23 ; CHECK-LABEL: rndrrs:
25 ; CHECK-NEXT: mrs x9, RNDRRS
26 ; CHECK-NEXT: cset w8, eq
27 ; CHECK-NEXT: and w8, w8, #0x1
28 ; CHECK-NEXT: str x9, [x0]
29 ; CHECK-NEXT: mov w0, w8
31 %1 = tail call { i64, i1 } @llvm.aarch64.rndrrs()
32 %2 = extractvalue { i64, i1 } %1, 0
33 %3 = extractvalue { i64, i1 } %1, 1
34 store i64 %2, i64* %__addr, align 8
35 %4 = zext i1 %3 to i32
39 declare { i64, i1 } @llvm.aarch64.rndr()
40 declare { i64, i1 } @llvm.aarch64.rndrrs()