================
@@ -1206,6 +1202,20 @@ class SPIRVStructurizer : public FunctionPass {
     AU.addPreserved<SPIRVConvergenceRegionAnalysisWrapperPass>();
     FunctionPass::getAnalysisUsage(AU);
   }
+
+  void createOpSelectMerge(IRBuilder<> *Builder, BlockAddress *MergeAddress) {
+    Instruction *BBTerminatorInst = Builder->GetInsertBlock()->getTerminator();
+
+    MDNode *MDNode = BBTerminatorInst->getMetadata("hlsl.controlflow.hint");
+    if (MDNode && MDNode->getNumOperands() != 2)
+      llvm_unreachable("invalid metadata hlsl.controlflow.hint");
----------------
llvm-beanz wrote:

This should be an assert, not a branch then unreachable.

https://github.com/llvm/llvm-project/pull/116331
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to