forked from OSchip/llvm-project
parent
a5f2816b1c
commit
6365ffea3e
|
@ -30,5 +30,7 @@ BUILTIN(__builtin_amdgpu_rsq_clamped, "dd", "nc")
|
|||
BUILTIN(__builtin_amdgpu_rsq_clampedf, "ff", "nc")
|
||||
BUILTIN(__builtin_amdgpu_ldexp, "ddi", "nc")
|
||||
BUILTIN(__builtin_amdgpu_ldexpf, "ffi", "nc")
|
||||
BUILTIN(__builtin_amdgpu_class, "bdi", "nc")
|
||||
BUILTIN(__builtin_amdgpu_classf, "bfi", "nc")
|
||||
|
||||
#undef BUILTIN
|
||||
|
|
|
@ -6393,6 +6393,9 @@ Value *CodeGenFunction::EmitR600BuiltinExpr(unsigned BuiltinID,
|
|||
case R600::BI__builtin_amdgpu_ldexp:
|
||||
case R600::BI__builtin_amdgpu_ldexpf:
|
||||
return emitFPIntBuiltin(*this, E, Intrinsic::AMDGPU_ldexp);
|
||||
case R600::BI__builtin_amdgpu_class:
|
||||
case R600::BI__builtin_amdgpu_classf:
|
||||
return emitFPIntBuiltin(*this, E, Intrinsic::AMDGPU_class);
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -127,3 +127,17 @@ void test_ldexp_f64(global double* out, double a, int b)
|
|||
{
|
||||
*out = __builtin_amdgpu_ldexp(a, b);
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @test_class_f32
|
||||
// CHECK: call i1 @llvm.AMDGPU.class.f32
|
||||
void test_class_f32(global float* out, float a, int b)
|
||||
{
|
||||
*out = __builtin_amdgpu_classf(a, b);
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @test_class_f64
|
||||
// CHECK: call i1 @llvm.AMDGPU.class.f64
|
||||
void test_class_f64(global double* out, double a, int b)
|
||||
{
|
||||
*out = __builtin_amdgpu_class(a, b);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue