1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=core-avx-i -mattr=+rdseed | FileCheck %s
4 declare {i64, i32} @llvm.x86.rdseed.64()
6 define i32 @_rdseed64_step(ptr %random_val) {
7 ; CHECK-LABEL: _rdseed64_step:
9 ; CHECK-NEXT: rdseedq %rcx
10 ; CHECK-NEXT: movl $1, %eax
11 ; CHECK-NEXT: cmovael %ecx, %eax
12 ; CHECK-NEXT: movq %rcx, (%rdi)
14 %call = call {i64, i32} @llvm.x86.rdseed.64()
15 %randval = extractvalue {i64, i32} %call, 0
16 store i64 %randval, ptr %random_val
17 %isvalid = extractvalue {i64, i32} %call, 1