[llvm] [SPIR-V] Fix BB ordering & register lifetime (PR #111026)

Vyacheslav Levytskyy via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 28 11:45:30 PDT 2024


Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/111026 at github.com>


================
@@ -87,6 +87,8 @@ BasicBlock *getExitFor(const ConvergenceRegion *CR) {
 // Returns the merge block designated by I if I is a merge instruction, nullptr
 // otherwise.
 BasicBlock *getDesignatedMergeBlock(Instruction *I) {
+  if (I == nullptr)
+    return nullptr;
----------------
VyacheslavLevytskyy wrote:

Would `dyn_cast_or_null<IntrinsicInst>(I)` do the trick to avoid adding this check?

https://github.com/llvm/llvm-project/pull/111026


More information about the llvm-commits mailing list