[PATCH] R600: Add intrinsics for math helper instructions

Matt Arsenault arsenm2 at gmail.com
Tue Jun 17 10:29:29 PDT 2014


On Jun 17, 2014, at 10:05 AM, Matt Arsenault <Matthew.Arsenault at amd.com> wrote:

> On 06/17/2014 07:10 AM, Tom Stellard wrote:
>> On Tue, Jun 17, 2014 at 12:28:14AM +0000, Matt Arsenault wrote:
>>> These will be used in the implementations of custom lowering of and library implementations of various math functions, so it's useful to expose these as builtins.
>>> 
>>> http://reviews.llvm.org/D4168
>>> 
>>> Files:
>>>   include/llvm/IR/IntrinsicsR600.td
>>>   lib/Target/R600/AMDGPUISelLowering.cpp
>>>   lib/Target/R600/AMDGPUISelLowering.h
>>>   lib/Target/R600/AMDGPUInstrInfo.td
>>>   lib/Target/R600/AMDGPUInstructions.td
>>>   lib/Target/R600/AMDGPUIntrinsics.td
>>>   lib/Target/R600/SIInsertWaits.cpp
>>>   lib/Target/R600/SIInstructions.td
>>>   lib/Transforms/InstCombine/InstCombineCalls.cpp
>>>   test/CodeGen/R600/llvm.AMDGPU.div_fixup.ll
>>>   test/CodeGen/R600/llvm.AMDGPU.div_fmas.ll
>>>   test/CodeGen/R600/llvm.AMDGPU.div_scale.ll
>>>   test/CodeGen/R600/llvm.AMDGPU.rcp.ll
>>>   test/CodeGen/R600/llvm.AMDGPU.trig_preop.ll
>>>   test/Transforms/InstCombine/r600-intrinsics.ll
>>> Index: include/llvm/IR/IntrinsicsR600.td
>>> ===================================================================
>>> --- include/llvm/IR/IntrinsicsR600.td
>>> +++ include/llvm/IR/IntrinsicsR600.td
>>> @@ -33,4 +33,34 @@
>>>                                         "__builtin_r600_read_tgid">;
>>>  defm int_r600_read_tidig : R600ReadPreloadRegisterIntrinsic_xyz <
>>>                                         "__builtin_r600_read_tidig">;
>>> +
>>>  } // End TargetPrefix = "r600"
>>> +
>>> +let TargetPrefix = "AMDGPU" in {
>>> +def int_AMDGPU_div_scale :
>>> +  Intrinsic<[llvm_anyfloat_ty, llvm_i1_ty],
>>> +            [LLVMMatchType<0>, LLVMMatchType<0>], [IntrNoMem]>,
>>> +            GCCBuiltin<"__builtin_r600_div_scale">;
>> I think we should replace the r600 in the builtin name with amdgpu, this will
>> prevent some confusion about what hardware is supported on.
>> 

I think some (maybe all) of these are for SI+ only
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140617/6376c1d4/attachment.html>


More information about the llvm-commits mailing list