[llvm-branch-commits] [llvm-branch] r167840 - in /llvm/branches/R600/lib/Target/AMDGPU: SIInstructions.td SIIntrinsics.td
Tom Stellard
thomas.stellard at amd.com
Tue Nov 13 07:22:10 PST 2012
Author: tstellar
Date: Tue Nov 13 09:22:10 2012
New Revision: 167840
URL: http://llvm.org/viewvc/llvm-project?rev=167840&view=rev
Log:
SI: Add intrinsic for sampling with bias.
Patch by: Michel Dänzer
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
Modified:
llvm/branches/R600/lib/Target/AMDGPU/SIInstructions.td
llvm/branches/R600/lib/Target/AMDGPU/SIIntrinsics.td
Modified: llvm/branches/R600/lib/Target/AMDGPU/SIInstructions.td
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/R600/lib/Target/AMDGPU/SIInstructions.td?rev=167840&r1=167839&r2=167840&view=diff
==============================================================================
--- llvm/branches/R600/lib/Target/AMDGPU/SIInstructions.td (original)
+++ llvm/branches/R600/lib/Target/AMDGPU/SIInstructions.td Tue Nov 13 09:22:10 2012
@@ -498,7 +498,7 @@
//def IMAGE_SAMPLE_D : MIMG_NoPattern_ <"IMAGE_SAMPLE_D", 0x00000022>;
//def IMAGE_SAMPLE_D_CL : MIMG_NoPattern_ <"IMAGE_SAMPLE_D_CL", 0x00000023>;
//def IMAGE_SAMPLE_L : MIMG_NoPattern_ <"IMAGE_SAMPLE_L", 0x00000024>;
-//def IMAGE_SAMPLE_B : MIMG_NoPattern_ <"IMAGE_SAMPLE_B", 0x00000025>;
+def IMAGE_SAMPLE_B : MIMG_Load_Helper <0x00000025, "IMAGE_SAMPLE_B">;
//def IMAGE_SAMPLE_B_CL : MIMG_NoPattern_ <"IMAGE_SAMPLE_B_CL", 0x00000026>;
//def IMAGE_SAMPLE_LZ : MIMG_NoPattern_ <"IMAGE_SAMPLE_LZ", 0x00000027>;
//def IMAGE_SAMPLE_C : MIMG_NoPattern_ <"IMAGE_SAMPLE_C", 0x00000028>;
@@ -1131,6 +1131,13 @@
SReg_256:$rsrc, SReg_128:$sampler)
>;
+/* int_SI_sample_bias */
+def : Pat <
+ (int_SI_sample_bias imm:$writemask, VReg_128:$coord, SReg_256:$rsrc, SReg_128:$sampler),
+ (IMAGE_SAMPLE_B imm:$writemask, 0, 0, 0, 0, 0, 0, 0, VReg_128:$coord,
+ SReg_256:$rsrc, SReg_128:$sampler)
+>;
+
def CLAMP_SI : CLAMP<VReg_32>;
def FABS_SI : FABS<VReg_32>;
def FNEG_SI : FNEG<VReg_32>;
Modified: llvm/branches/R600/lib/Target/AMDGPU/SIIntrinsics.td
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/R600/lib/Target/AMDGPU/SIIntrinsics.td?rev=167840&r1=167839&r2=167840&view=diff
==============================================================================
--- llvm/branches/R600/lib/Target/AMDGPU/SIIntrinsics.td (original)
+++ llvm/branches/R600/lib/Target/AMDGPU/SIIntrinsics.td Tue Nov 13 09:22:10 2012
@@ -23,6 +23,7 @@
def int_SI_wqm : Intrinsic <[], [], []>;
def int_SI_sample : Intrinsic <[llvm_v4f32_ty], [llvm_i32_ty, llvm_v4f32_ty, llvm_v8i32_ty, llvm_v4i32_ty], [IntrReadMem]>;
+ def int_SI_sample_bias : Intrinsic <[llvm_v4f32_ty], [llvm_i32_ty, llvm_v4f32_ty, llvm_v8i32_ty, llvm_v4i32_ty], [IntrReadMem]>;
/* Interpolation Intrinsics */
More information about the llvm-branch-commits
mailing list