[WebAssembly] Don't perform the returned-argument optimization on constants.
[oota-llvm.git] / test / CodeGen / NVPTX / fp-literals.ll
1 ; RUN: llc < %s -march=nvptx -mcpu=sm_20 -fp-contract=fast | FileCheck %s
2
3 target triple = "nvptx64-unknown-cuda"
4 target 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"
5
6 ; Make sure we can properly differentiate between single-precision and
7 ; double-precision FP literals.
8
9 ; CHECK: myaddf
10 ; CHECK: add.f32 %f{{[0-9]+}}, %f{{[0-9]+}}, 0f3F800000
11 define float @myaddf(float %a) {
12   %ret = fadd float %a, 1.0
13   ret float %ret
14 }
15
16 ; CHECK: myaddd
17 ; CHECK: add.f64 %fd{{[0-9]+}}, %fd{{[0-9]+}}, 0d3FF0000000000000
18 define double @myaddd(double %a) {
19   %ret = fadd double %a, 1.0
20   ret double %ret
21 }