1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=nvptx -mcpu=sm_20 -nvptx-fma-level=1 | FileCheck %s -check-prefix=FMA 2*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=nvptx -mcpu=sm_20 -nvptx-fma-level=0 | FileCheck %s -check-prefix=MUL 3*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 -nvptx-fma-level=1 | FileCheck %s -check-prefix=FMA 4*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 -nvptx-fma-level=0 | FileCheck %s -check-prefix=MUL 5*9880d681SAndroid Build Coastguard Worker 6*9880d681SAndroid Build Coastguard Workerdefine ptx_device float @test_mul_add_f(float %x, float %y, float %z) { 7*9880d681SAndroid Build Coastguard Workerentry: 8*9880d681SAndroid Build Coastguard Worker; FMA: fma.rn.f32 9*9880d681SAndroid Build Coastguard Worker; MUL: mul.rn.f32 10*9880d681SAndroid Build Coastguard Worker; MUL: add.rn.f32 11*9880d681SAndroid Build Coastguard Worker %a = fmul float %x, %y 12*9880d681SAndroid Build Coastguard Worker %b = fadd float %a, %z 13*9880d681SAndroid Build Coastguard Worker ret float %b 14*9880d681SAndroid Build Coastguard Worker} 15*9880d681SAndroid Build Coastguard Worker 16*9880d681SAndroid Build Coastguard Workerdefine ptx_device double @test_mul_add_d(double %x, double %y, double %z) { 17*9880d681SAndroid Build Coastguard Workerentry: 18*9880d681SAndroid Build Coastguard Worker; FMA: fma.rn.f64 19*9880d681SAndroid Build Coastguard Worker; MUL: mul.rn.f64 20*9880d681SAndroid Build Coastguard Worker; MUL: add.rn.f64 21*9880d681SAndroid Build Coastguard Worker %a = fmul double %x, %y 22*9880d681SAndroid Build Coastguard Worker %b = fadd double %a, %z 23*9880d681SAndroid Build Coastguard Worker ret double %b 24*9880d681SAndroid Build Coastguard Worker} 25