comparison test/CodeGen/AMDGPU/llvm.AMDGPU.rsq.clamped.f64.ll @ 95:afa8332a0e37

LLVM 3.8
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Tue, 13 Oct 2015 17:48:58 +0900
parents test/CodeGen/R600/llvm.AMDGPU.rsq.clamped.f64.ll@60c9769439b8
children
comparison
equal deleted inserted replaced
84:f3e34b893a5f 95:afa8332a0e37
1 ; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
2 ; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=VI -check-prefix=FUNC %s
3
4 declare double @llvm.AMDGPU.rsq.clamped.f64(double) nounwind readnone
5
6 ; FUNC-LABEL: {{^}}rsq_clamped_f64:
7 ; SI: v_rsq_clamp_f64_e32
8
9 ; VI: v_rsq_f64_e32 [[RSQ:v\[[0-9]+:[0-9]+\]]], s[2:3]
10 ; TODO: this constant should be folded:
11 ; VI: s_mov_b32 s[[ALLBITS:[0-9+]]], -1
12 ; VI: s_mov_b32 s[[HIGH1:[0-9+]]], 0x7fefffff
13 ; VI: s_mov_b32 s[[LOW1:[0-9+]]], s[[ALLBITS]]
14 ; VI: v_min_f64 v[0:1], [[RSQ]], s{{\[}}[[LOW1]]:[[HIGH1]]]
15 ; VI: s_mov_b32 s[[HIGH2:[0-9+]]], 0xffefffff
16 ; VI: s_mov_b32 s[[LOW2:[0-9+]]], s[[ALLBITS]]
17 ; VI: v_max_f64 v[0:1], v[0:1], s{{\[}}[[LOW2]]:[[HIGH2]]]
18
19 define void @rsq_clamped_f64(double addrspace(1)* %out, double %src) nounwind {
20 %rsq_clamped = call double @llvm.AMDGPU.rsq.clamped.f64(double %src) nounwind readnone
21 store double %rsq_clamped, double addrspace(1)* %out, align 8
22 ret void
23 }