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 3 4 declare {i64, i32} @llvm.x86.rdseed.64() 5 6 define i32 @_rdseed64_step(i64* %random_val) { 7 ; CHECK-LABEL: _rdseed64_step: 8 ; CHECK: # %bb.0: 9 ; CHECK-NEXT: rdseedq %rcx 10 ; CHECK-NEXT: movl $1, %eax 11 ; CHECK-NEXT: cmovael %ecx, %eax 12 ; CHECK-NEXT: movq %rcx, (%rdi) 13 ; CHECK-NEXT: retq 14 %call = call {i64, i32} @llvm.x86.rdseed.64() 15 %randval = extractvalue {i64, i32} %call, 0 16 store i64 %randval, i64* %random_val 17 %isvalid = extractvalue {i64, i32} %call, 1 18 ret i32 %isvalid 19 } 20