================ @@ -2944,6 +2944,10 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg, return selectExtInst(ResVReg, ResType, I, CL::fract, GL::Fract); case Intrinsic::spv_normalize: return selectExtInst(ResVReg, ResType, I, CL::normalize, GL::Normalize); + case Intrinsic::spv_reflect: + if (STI.isVulkanEnv()) // There is no CL equivalent of Reflect ---------------- farzonl wrote:
I don't think this if statement does what you think it does. As long as the intrinsic remains in the MIR you won't be able to proceed with codegen. instead if you want to gracefully exit you should modify the GLSL version of `selectExtInst ` to do something like this ```cpp if (!STI.canUseExtInstSet(SPIRV::InstructionSet::GLSL_std_450)) { std::string DiagMsg; raw_string_ostream OS(DiagMsg); I.print(OS); DiagMsg = "Intrinsic selection not supported for this instruction set: " + DiagMsg; report_fatal_error(DiagMsg.c_str(), false); } //original behavior of selectExtInst ``` https://github.com/llvm/llvm-project/pull/122992 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits