We'll need to emit these manually in clang to add range metadata.
Names in llvm/IR/Intrinsics*.td are considered before custom emit so they need to go.
Differential D20691
AMDGPU: Remove gcc builtin names from workitem intrinsics jvesely on May 26 2016, 10:48 AM. Authored by
Details We'll need to emit these manually in clang to add range metadata. Names in llvm/IR/Intrinsics*.td are considered before custom emit so they need to go.
Diff Detail
Event TimelineComment Actions Why do you need this? I know I had a patch to do the same thing at some point, but don't remember why. Since these don't need mangling I would expect GCCBuiltin to work correctly Comment Actions clang in CodeGenFunction::EmitBuiltinExpr() considers embedded intrinsic names before calling EmitTargetBuiltinExpr(). Since we want these intrinsics to be emitted with range metadata we need to do it in EmitAMDGPUBuiltinExpr(called by EmitTargetBUiltinExpr). The embedded names need to be removed, otherwise the Emit* functions won't run. Comment Actions LGTM
|
This comment isn't needed / is misleading since the intrinsic itself has no indication of the range limit