diff --git a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp --- a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp +++ b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp @@ -11023,6 +11023,8 @@ } static bool hasCFUser(const Value *V, SmallPtrSet &Visited) { + if (!isa(V)) + return false; if (!Visited.insert(V).second) return false; bool Result = false;