R600/SI: Take target parameter for sample intrinsics.
authorTom Stellard <thomas.stellard@amd.com>
Mon, 21 Jan 2013 15:40:47 +0000 (15:40 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Mon, 21 Jan 2013 15:40:47 +0000 (15:40 +0000)
Patch by: Michel Dänzer

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173052 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/R600/SIInstructions.td
lib/Target/R600/SIIntrinsics.td

index cac42da75f16f4c13b74b3f8758000875b67d330..0f9d572c4ada5941baa39425f5b6662f4df6d620 100644 (file)
@@ -1186,21 +1186,21 @@ def : Pat <
 
 /* int_SI_sample */
 def : Pat <
-  (int_SI_sample imm:$writemask, VReg_128:$coord, SReg_256:$rsrc, SReg_128:$sampler),
+  (int_SI_sample imm:$writemask, VReg_128:$coord, SReg_256:$rsrc, SReg_128:$sampler, imm),
   (IMAGE_SAMPLE imm:$writemask, 0, 0, 0, 0, 0, 0, 0, VReg_128:$coord,
                 SReg_256:$rsrc, SReg_128:$sampler)
 >;
 
 /* int_SI_sample_lod */
 def : Pat <
-  (int_SI_sample_lod imm:$writemask, VReg_128:$coord, SReg_256:$rsrc, SReg_128:$sampler),
+  (int_SI_sample_lod imm:$writemask, VReg_128:$coord, SReg_256:$rsrc, SReg_128:$sampler, imm),
   (IMAGE_SAMPLE_L imm:$writemask, 0, 0, 0, 0, 0, 0, 0, VReg_128:$coord,
                   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),
+  (int_SI_sample_bias imm:$writemask, VReg_128:$coord, SReg_256:$rsrc, SReg_128:$sampler, imm),
   (IMAGE_SAMPLE_B imm:$writemask, 0, 0, 0, 0, 0, 0, 0, VReg_128:$coord,
                   SReg_256:$rsrc, SReg_128:$sampler)
 >;
index 0d1064e9b68670aee701aa6f9394944e607900a5..43931445eef13497b76fccd14bae800205e36190 100644 (file)
@@ -22,7 +22,7 @@ let TargetPrefix = "SI", isTarget = 1 in {
   def int_SI_vs_load_input : Intrinsic <[llvm_v4f32_ty], [llvm_v4i32_ty, llvm_i16_ty, llvm_i32_ty], [IntrReadMem]> ;
   def int_SI_wqm : Intrinsic <[], [], []>;
 
-  class Sample : Intrinsic <[llvm_v4f32_ty], [llvm_i32_ty, llvm_v4f32_ty, llvm_v8i32_ty, llvm_v4i32_ty], [IntrReadMem]>;
+  class Sample : Intrinsic <[llvm_v4f32_ty], [llvm_i32_ty, llvm_v4f32_ty, llvm_v8i32_ty, llvm_v4i32_ty, llvm_i32_ty], [IntrReadMem]>;
 
   def int_SI_sample : Sample;
   def int_SI_sample_bias : Sample;