[llvm] [PowerPC] fixed issue "Failure to optimize (x == 0) ? 0xFF : 0 to addic+subfe instead of cntlzw+srwi+neg" (PR #190606)

Lei Huang via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 7 07:00:03 PDT 2026


================

----------------
lei137 wrote:

```suggestion
     // Zero-extend if input type differs from result type.
  if (XVT != VT)
    X = DAG.getNode(ISD::ZERO_EXTEND, dl, VT, X);
```

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


More information about the llvm-commits mailing list