[llvm] SPIRV: Set NoPHIs property after selection (PR #136327)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 18 10:03:00 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-spir-v
Author: Matt Arsenault (arsenm)
<details>
<summary>Changes</summary>
There should be no PHIs after selection, as OpPhi is used
instead. This hopefully avoids errors in #<!-- -->135277.
---
Full diff: https://github.com/llvm/llvm-project/pull/136327.diff
1 Files Affected:
- (modified) llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp (+6)
``````````diff
diff --git a/llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp b/llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp
index 68286737b972f..f30578767a939 100644
--- a/llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp
@@ -269,6 +269,12 @@ class SPIRVInstructionSelect : public InstructionSelect {
return InstructionSelect::getRequiredProperties().reset(
MachineFunctionProperties::Property::RegBankSelected);
}
+
+ MachineFunctionProperties getClearedProperties() const override {
+ // No generic Phis remain, replaced with OpPhi
+ return InstructionSelect::getClearedProperties().reset(
+ MachineFunctionProperties::Property::NoPHIs);
+ }
};
} // namespace
``````````
</details>
https://github.com/llvm/llvm-project/pull/136327
More information about the llvm-commits
mailing list