forked from OSchip/llvm-project
parent
d107be846f
commit
a274b209f5
|
@ -81,6 +81,7 @@ BUILTIN(__builtin_amdgcn_sicmpl, "LUiLiLiIi", "nc")
|
|||
BUILTIN(__builtin_amdgcn_fcmp, "LUiddIi", "nc")
|
||||
BUILTIN(__builtin_amdgcn_fcmpf, "LUiffIi", "nc")
|
||||
BUILTIN(__builtin_amdgcn_ds_swizzle, "iiIi", "nc")
|
||||
BUILTIN(__builtin_amdgcn_fmed3f, "ffff", "nc")
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// VI+ only builtins.
|
||||
|
|
|
@ -8397,7 +8397,8 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID,
|
|||
case AMDGPU::BI__builtin_amdgcn_classf:
|
||||
case AMDGPU::BI__builtin_amdgcn_classh:
|
||||
return emitFPIntBuiltin(*this, E, Intrinsic::amdgcn_class);
|
||||
|
||||
case AMDGPU::BI__builtin_amdgcn_fmed3f:
|
||||
return emitTernaryBuiltin(*this, E, Intrinsic::amdgcn_fmed3);
|
||||
case AMDGPU::BI__builtin_amdgcn_read_exec: {
|
||||
CallInst *CI = cast<CallInst>(
|
||||
EmitSpecialRegisterBuiltin(*this, E, Int64Ty, Int64Ty, true, "exec"));
|
||||
|
|
|
@ -396,6 +396,13 @@ void test_get_local_id(int d, global int *out)
|
|||
}
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @test_fmed3_f32
|
||||
// CHECK: call float @llvm.amdgcn.fmed3.f32(
|
||||
void test_fmed3_f32(global float* out, float a, float b, float c)
|
||||
{
|
||||
*out = __builtin_amdgcn_fmed3f(a, b, c);
|
||||
}
|
||||
|
||||
// CHECK-DAG: [[WI_RANGE]] = !{i32 0, i32 1024}
|
||||
// CHECK-DAG: attributes #[[NOUNWIND_READONLY:[0-9]+]] = { nounwind readonly }
|
||||
// CHECK-DAG: attributes #[[READ_EXEC_ATTRS]] = { convergent }
|
||||
|
|
Loading…
Reference in New Issue