brintos

brintos / llvm-project-archived public Read only

0
0
Text · 789 B · e3e63ff Raw
23 lines · plain
1; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_20 -fp-contract=fast | FileCheck %s2; RUN: %if ptxas %{ llc < %s -mtriple=nvptx64 -mcpu=sm_20 -fp-contract=fast | %ptxas-verify %}3 4target triple = "nvptx64-unknown-cuda"5target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v32:32:32-v64:64:64-v128:128:128-n16:32:64"6 7; Make sure we can properly differentiate between single-precision and8; double-precision FP literals.9 10; CHECK: myaddf11; CHECK: add.f32 %r{{[0-9]+}}, %r{{[0-9]+}}, 0f3F80000012define float @myaddf(float %a) {13  %ret = fadd float %a, 1.014  ret float %ret15}16 17; CHECK: myaddd18; CHECK: add.f64 %rd{{[0-9]+}}, %rd{{[0-9]+}}, 0d3FF000000000000019define double @myaddd(double %a) {20  %ret = fadd double %a, 1.021  ret double %ret22}23