[llvm] [PowerPC] Fix IS_FPCLASS crash on 32-bit AIX targets for fcFinite/fcInf/fcInf|fcNan masks (PR #213298)

Daniel Chen via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 10:50:15 PDT 2026


DanielCChen wrote:

> Why add a new testcase vs updating the IR test file from the original patch with the missing runlines? Seems the tests are similar to what as added in `‎llvm/test/CodeGen/PowerPC/fp-classify-nan.ll‎` but just with different run lines.
> 
> Is `-O0` runs important to reproduce errors that was not seen via the `-O2` run lines??

The two test files are testing fundamentally different things.

- The `fp-classify-nan.ll` tests only `fcNan/~fcNan` on pwr8+64-bits targets.
- The new `fp-classify-aix32.ll` tests 5 distinct masks `fcFinite`, `fcInf`, `fcInf|fcNan`, f`cNan`, `~fcNan` — across pwr7 and pwr8 on 32-bit AIX. It also covers `strictfp` variants, which `fp-classify-nan.ll` does not.

Also, as stated in the PR's description, there are two distinct crashes: one at `-O3` and one at `-O0` for different reasons. So yes, `-O0` run is important. 

That being said, if you prefer, I could move the PPC32 run lines and `fcNan/~fcNan` from the new test to the old test, and keep the new test for the masks only.

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


More information about the llvm-commits mailing list