[llvm] [SPIRV] Change how to detect OpenCL/Vulkan Env and update tests accordingly. (PR #129689)

Nathan Gauër via llvm-commits llvm-commits at lists.llvm.org
Tue May 27 05:54:24 PDT 2025


================
@@ -1036,7 +1036,7 @@ bool SPIRVInstructionSelector::selectUnOp(Register ResVReg,
                                           const SPIRVType *ResType,
                                           MachineInstr &I,
                                           unsigned Opcode) const {
-  if (STI.isOpenCLEnv() && I.getOperand(1).isReg()) {
+  if (!STI.isLogicalSPIRV() && I.getOperand(1).isReg()) {
----------------
Keenuts wrote:

```suggestion
  if (STI.isPhysicalSPIRV() && I.getOperand(1).isReg()) {
```

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


More information about the llvm-commits mailing list