[llvm][GenericUniformity] Prevent assert while calculating temporal divergence
authorYashwant Singh <Yashwant.Singh@amd.com>
Thu, 2 Mar 2023 07:08:52 +0000 (12:38 +0530)
committerYashwant Singh <Yashwant.Singh@amd.com>
Thu, 2 Mar 2023 07:12:35 +0000 (12:42 +0530)
commit5230f6c1c274778d9204288667c62c8b199cab65
tree729e10fd285caad0f2798973eb371492f0760063
parent9d28e00e741cb19684111656803434aceef4c2a0
[llvm][GenericUniformity] Prevent assert while calculating temporal divergence

analyzeTemporalDivergence() was missing the check for always-uniform before
evaluating weather an instruction depends on a value defined in the cycle.
Fix for #60638
https://github.com/llvm/llvm-project/issues/60638

Reviewed By: sameerds, foad, #amdgpu

Differential Revision: https://reviews.llvm.org/D144070
llvm/include/llvm/ADT/GenericUniformityImpl.h
llvm/lib/Analysis/UniformityAnalysis.cpp
llvm/lib/CodeGen/MachineUniformityAnalysis.cpp
llvm/test/Analysis/DivergenceAnalysis/AMDGPU/MIR/uses-value-from-cycle.mir [new file with mode: 0644]