[llvm] [CodeGen] [EarlyIfConversion] Prioritize conversion of hard to predict branches (PR #174457)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 26 03:58:02 PST 2026


================
@@ -896,6 +915,101 @@ void EarlyIfConverter::invalidateTraces() {
   Traces->verifyAnalysis();
 }
 
+static bool isConstantPoolLoad(const MachineInstr *MI) {
+  // Check if this instruction is a load.
+  if (MI->mayLoad()) {
----------------
fhahn wrote:

```suggestion
  if (!MI->mayLoad())
  return false;
```

can use early exit to reduce nesting

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


More information about the llvm-commits mailing list