mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
AMDGPU: Fix asserting on 0 dmask for image intrinsics
Fold these to undef during lowering so users get eliminated. llvm-svn: 298387
This commit is contained in:
parent
e1375f5e41
commit
489b4bdeba
@ -2988,6 +2988,64 @@ SDValue SITargetLowering::LowerINTRINSIC_W_CHAIN(SDValue Op,
|
||||
|
||||
return DAG.getMemIntrinsicNode(Opc, DL, Op->getVTList(), Ops, IntVT, MMO);
|
||||
}
|
||||
// Basic sample.
|
||||
case Intrinsic::amdgcn_image_sample:
|
||||
case Intrinsic::amdgcn_image_sample_cl:
|
||||
case Intrinsic::amdgcn_image_sample_d:
|
||||
case Intrinsic::amdgcn_image_sample_d_cl:
|
||||
case Intrinsic::amdgcn_image_sample_l:
|
||||
case Intrinsic::amdgcn_image_sample_b:
|
||||
case Intrinsic::amdgcn_image_sample_b_cl:
|
||||
case Intrinsic::amdgcn_image_sample_lz:
|
||||
case Intrinsic::amdgcn_image_sample_cd:
|
||||
case Intrinsic::amdgcn_image_sample_cd_cl:
|
||||
|
||||
// Sample with comparison.
|
||||
case Intrinsic::amdgcn_image_sample_c:
|
||||
case Intrinsic::amdgcn_image_sample_c_cl:
|
||||
case Intrinsic::amdgcn_image_sample_c_d:
|
||||
case Intrinsic::amdgcn_image_sample_c_d_cl:
|
||||
case Intrinsic::amdgcn_image_sample_c_l:
|
||||
case Intrinsic::amdgcn_image_sample_c_b:
|
||||
case Intrinsic::amdgcn_image_sample_c_b_cl:
|
||||
case Intrinsic::amdgcn_image_sample_c_lz:
|
||||
case Intrinsic::amdgcn_image_sample_c_cd:
|
||||
case Intrinsic::amdgcn_image_sample_c_cd_cl:
|
||||
|
||||
// Sample with offsets.
|
||||
case Intrinsic::amdgcn_image_sample_o:
|
||||
case Intrinsic::amdgcn_image_sample_cl_o:
|
||||
case Intrinsic::amdgcn_image_sample_d_o:
|
||||
case Intrinsic::amdgcn_image_sample_d_cl_o:
|
||||
case Intrinsic::amdgcn_image_sample_l_o:
|
||||
case Intrinsic::amdgcn_image_sample_b_o:
|
||||
case Intrinsic::amdgcn_image_sample_b_cl_o:
|
||||
case Intrinsic::amdgcn_image_sample_lz_o:
|
||||
case Intrinsic::amdgcn_image_sample_cd_o:
|
||||
case Intrinsic::amdgcn_image_sample_cd_cl_o:
|
||||
|
||||
// Sample with comparison and offsets.
|
||||
case Intrinsic::amdgcn_image_sample_c_o:
|
||||
case Intrinsic::amdgcn_image_sample_c_cl_o:
|
||||
case Intrinsic::amdgcn_image_sample_c_d_o:
|
||||
case Intrinsic::amdgcn_image_sample_c_d_cl_o:
|
||||
case Intrinsic::amdgcn_image_sample_c_l_o:
|
||||
case Intrinsic::amdgcn_image_sample_c_b_o:
|
||||
case Intrinsic::amdgcn_image_sample_c_b_cl_o:
|
||||
case Intrinsic::amdgcn_image_sample_c_lz_o:
|
||||
case Intrinsic::amdgcn_image_sample_c_cd_o:
|
||||
case Intrinsic::amdgcn_image_sample_c_cd_cl_o:
|
||||
|
||||
case Intrinsic::amdgcn_image_getlod: {
|
||||
// Replace dmask with everything disabled with undef.
|
||||
const ConstantSDNode *DMask = dyn_cast<ConstantSDNode>(Op.getOperand(5));
|
||||
if (!DMask || DMask->isNullValue()) {
|
||||
SDValue Undef = DAG.getUNDEF(Op.getValueType());
|
||||
return DAG.getMergeValues({ Undef, Op.getOperand(0) }, SDLoc(Op));
|
||||
}
|
||||
|
||||
return SDValue();
|
||||
}
|
||||
default:
|
||||
return SDValue();
|
||||
}
|
||||
|
@ -28,6 +28,16 @@ main_body:
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_getlod_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_getlod_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.getlod.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
declare <4 x float> @llvm.amdgcn.image.getlod.v4f32.f32.v8i32(float, <8 x i32>, <4 x i32>, i32, i1, i1, i1, i1, i1) #0
|
||||
declare <4 x float> @llvm.amdgcn.image.getlod.v4f32.v2f32.v8i32(<2 x float>, <8 x i32>, <4 x i32>, i32, i1, i1, i1, i1, i1) #0
|
||||
|
@ -285,6 +285,128 @@ main_body:
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_variable_dmask_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_variable_dmask_enabled(float addrspace(1)* %out, i32 %dmask) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 %dmask, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_cl_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_cl_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.cl.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_d_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_d_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.d.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_d_cl_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_d_cl_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.d.cl.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_l_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_l_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.l.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_b_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_b_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.b.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_b_cl_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_b_cl_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.b.cl.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_lz_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_lz_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.lz.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_cd_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_cd_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.cd.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_cd_cl_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_cd_cl_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.cd.cl.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
declare <4 x float> @llvm.amdgcn.image.sample.v4f32.v4f32.v8i32(<4 x float>, <8 x i32>, <4 x i32>, i32, i1, i1, i1, i1, i1) #0
|
||||
declare <4 x float> @llvm.amdgcn.image.sample.cl.v4f32.v4f32.v8i32(<4 x float>, <8 x i32>, <4 x i32>, i32, i1, i1, i1, i1, i1) #0
|
||||
declare <4 x float> @llvm.amdgcn.image.sample.d.v4f32.v4f32.v8i32(<4 x float>, <8 x i32>, <4 x i32>, i32, i1, i1, i1, i1, i1) #0
|
||||
|
@ -181,6 +181,225 @@ main_body:
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_o_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_o_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.o.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_cl_o_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_cl_o_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.cl.o.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_d_o_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_d_o_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.d.o.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_d_cl_o_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_d_cl_o_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.d.cl.o.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_l_o_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_l_o_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.l.o.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_b_o_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_b_o_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.b.o.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_b_cl_o_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_b_cl_o_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.b.cl.o.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_lz_o_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_lz_o_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.lz.o.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_cd_o_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_cd_o_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.cd.o.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_cd_cl_o_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_cd_cl_o_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.cd.cl.o.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_c_o_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_c_o_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.c.o.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_c_cl_o_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_c_cl_o_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.c.cl.o.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_c_d_o_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_c_d_o_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.c.d.o.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_c_d_cl_o_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_c_d_cl_o_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.c.d.cl.o.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_c_l_o_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_c_l_o_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.c.l.o.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_c_b_o_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_c_b_o_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.c.b.o.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_c_b_cl_o_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_c_b_cl_o_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.c.b.cl.o.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_c_lz_o_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_c_lz_o_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.c.lz.o.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_c_cd_o_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_c_cd_o_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.c.cd.o.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; GCN-LABEL: {{^}}adjust_writemask_sample_c_cd_cl_o_none_enabled:
|
||||
; GCN-NOT: image
|
||||
; GCN-NOT: store
|
||||
define void @adjust_writemask_sample_c_cd_cl_o_none_enabled(float addrspace(1)* %out) {
|
||||
main_body:
|
||||
%r = call <4 x float> @llvm.amdgcn.image.sample.c.cd.cl.o.v4f32.v4f32.v8i32(<4 x float> undef, <8 x i32> undef, <4 x i32> undef, i32 0, i1 false, i1 false, i1 false, i1 false, i1 false)
|
||||
%elt0 = extractelement <4 x float> %r, i32 0
|
||||
store float %elt0, float addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
declare <4 x float> @llvm.amdgcn.image.sample.o.v4f32.v4f32.v8i32(<4 x float>, <8 x i32>, <4 x i32>, i32, i1, i1, i1, i1, i1) #0
|
||||
declare <4 x float> @llvm.amdgcn.image.sample.cl.o.v4f32.v4f32.v8i32(<4 x float>, <8 x i32>, <4 x i32>, i32, i1, i1, i1, i1, i1) #0
|
||||
|
Loading…
Reference in New Issue
Block a user