[PATCH] D19747: AMDGPU: llvm.SI.fs.constant is a source of divergence
Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 2 10:43:01 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL268259: AMDGPU: llvm.SI.fs.constant is a source of divergence (authored by nha).
Changed prior to commit:
http://reviews.llvm.org/D19747?vs=55673&id=55843#toc
Repository:
rL LLVM
http://reviews.llvm.org/D19747
Files:
llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
llvm/trunk/test/Analysis/DivergenceAnalysis/AMDGPU/interp-intrinsics.ll
Index: llvm/trunk/test/Analysis/DivergenceAnalysis/AMDGPU/interp-intrinsics.ll
===================================================================
--- llvm/trunk/test/Analysis/DivergenceAnalysis/AMDGPU/interp-intrinsics.ll
+++ llvm/trunk/test/Analysis/DivergenceAnalysis/AMDGPU/interp-intrinsics.ll
@@ -0,0 +1,22 @@
+; RUN: opt -mtriple amdgcn--- -analyze -divergence %s | FileCheck %s
+
+; CHECK-LABEL: 'fs_interp'
+; CHECK: DIVERGENT: %v = call float @llvm.SI.fs.interp(
+define amdgpu_ps void @fs_interp(i32 inreg %prim_mask, <2 x i32> %interp_param) #1 {
+ %v = call float @llvm.SI.fs.interp(i32 0, i32 0, i32 %prim_mask, <2 x i32> %interp_param)
+ store volatile float %v, float addrspace(1)* undef
+ ret void
+}
+
+; CHECK-LABEL: 'fs_constant'
+; CHECK: DIVERGENT: %v = call float @llvm.SI.fs.constant(
+define amdgpu_ps void @fs_constant(i32 inreg %prim_mask, <2 x i32> %interp_param) #1 {
+ %v = call float @llvm.SI.fs.constant(i32 0, i32 0, i32 %prim_mask)
+ store volatile float %v, float addrspace(1)* undef
+ ret void
+}
+
+declare float @llvm.SI.fs.interp(i32, i32, i32, <2 x i32>) #0
+declare float @llvm.SI.fs.constant(i32, i32, i32) #0
+
+attributes #0 = { nounwind readnone }
Index: llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
@@ -260,6 +260,7 @@
return false;
case AMDGPUIntrinsic::SI_tid:
case AMDGPUIntrinsic::SI_fs_interp:
+ case AMDGPUIntrinsic::SI_fs_constant:
return true;
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19747.55843.patch
Type: text/x-patch
Size: 1638 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160502/580992fc/attachment.bin>
More information about the llvm-commits
mailing list