[llvm] r231259 - R600/SI: Add an intrinsic for S_FLBIT_I32 / V_FFBH_I32

Matt Arsenault Matthew.Arsenault at amd.com
Mon Mar 16 15:46:12 PDT 2015


On 03/04/2015 09:33 AM, Marek Olsak wrote:
> Author: mareko
> Date: Wed Mar  4 11:33:45 2015
> New Revision: 231259
>
> URL: http://llvm.org/viewvc/llvm-project?rev=231259&view=rev
> Log:
> R600/SI: Add an intrinsic for S_FLBIT_I32 / V_FFBH_I32
>
> Required by OpenGL (ARB_gpu_shader5).
>
> Added:
>      llvm/trunk/test/CodeGen/R600/llvm.AMDGPU.flbit.i32.ll
> Modified:
>      llvm/trunk/lib/Target/R600/AMDGPUIntrinsics.td
>      llvm/trunk/lib/Target/R600/SIInstrInfo.cpp
>      llvm/trunk/lib/Target/R600/SIInstructions.td
>
> Modified: llvm/trunk/lib/Target/R600/AMDGPUIntrinsics.td
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/AMDGPUIntrinsics.td?rev=231259&r1=231258&r2=231259&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/R600/AMDGPUIntrinsics.td (original)
> +++ llvm/trunk/lib/Target/R600/AMDGPUIntrinsics.td Wed Mar  4 11:33:45 2015
> @@ -68,6 +68,7 @@ let TargetPrefix = "AMDGPU", isTarget =
>     def int_AMDGPU_bfe_u32 : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>;
>     def int_AMDGPU_bfm : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>;
>     def int_AMDGPU_brev : Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoMem]>;
> +  def int_AMDGPU_flbit_i32 : Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoMem]>;
>     def int_AMDGPU_barrier_local  : Intrinsic<[], [], []>;
>     def int_AMDGPU_barrier_global  : Intrinsic<[], [], []>;
>   }
>

Sorry I didn't catch this before, but this should be placed in 
include/llvm/IR/IntrinsicsR600.td instead of AMDGPUIntrinsics.td. It 
doesn't matter for you particularly much since mesa refers to the 
intrinsics with the string names, but defining it in the public area 
exposes an enum for the intrinsic to users outside of the backend and 
this is a generally useful intrinsic

-Matt



More information about the llvm-commits mailing list